8000 gh-104679 Fixed syntax highlighting in turtle docs (#104682) · python/cpython@2c97878 · GitHub
[go: up one dir, main page]

Skip to content

Commit 2c97878

Browse files
authored
gh-104679 Fixed syntax highlighting in turtle docs (#104682)
1 parent ff7f731 commit 2c97878

File tree

1 file changed

+83
-83
lines changed

1 file changed

+83
-83
lines changed

Doc/library/turtle.rst

Lines changed: 83 additions & 83 deletions
Original file line numberDiff line numberDiff line change
@@ -359,18 +359,18 @@ Turtle motion
359359
.. doctest::
360360
:skipif: _tkinter is None
361361

362-
>>> tp = turtle.pos()
363-
>>> tp
364-
(0.00,0.00)
365-
>>> turtle.setpos(60,30)
366-
>>> turtle.pos()
367-
(60.00,30.00)
368-
>>> turtle.setpos((20,80))
369-
>>> turtle.pos()
370-
(20.00,80.00)
371-
>>> turtle.setpos(tp)
372-
>>> turtle.pos()
373-
(0.00,0.00)
362+
>>> tp = turtle.pos()
363+
>>> tp
364+
(0.00,0.00)
365+
>>> turtle.setpos(60,30)
366+
>>> turtle.pos()
367+
(60.00,30.00)
368+
>>> turtle.setpos((20,80))
369+
>>> turtle.pos()
370+
(20.00,80.00)
371+
>>> turtle.setpos(tp)
372+
>>> turtle.pos()
373+
(0.00,0.00)
374374

375375

376376
.. function:: teleport(x, y=None, *, fill_gap=False)
@@ -395,18 +395,18 @@ Turtle motion
395395
.. doctest::
396396
:skipif: _tkinter is None
397397

398-
>>> tp = turtle.pos()
399-
>>> tp
400-
(0.00,0.00)
401-
>>> turtle.teleport(60)
402-
>>> turtle.pos()
403-
(60.00,0.00)
404-
>>> turtle.teleport(y=10)
405-
>>> turtle.pos()
406-
(60.00,10.00)
407-
>>> turtle.teleport(20, 30)
408-
>>> turtle.pos()
409-
(20.00,30.00)
398+
>>> tp = turtle.pos()
399+
>>> tp
400+
(0.00,0.00)
401+
>>> turtle.teleport(60)
402+
>>> turtle.pos()
403+
(60.00,0.00)
404+
>>> turtle.teleport(y=10)
405+
>>> turtle.pos()
406+
(60.00,10.00)
407+
>>> turtle.teleport(20, 3 D7AE 0)
408+
>>> turtle.pos()
409+
(20.00,30.00)
410410

411411
.. versionadded: 3.12
412412
@@ -950,23 +950,23 @@ Color control
950950
.. doctest::
951951
:skipif: _tkinter is None
952952

953-
>>> colormode()
954-
1.0
955-
>>> turtle.pencolor()
956-
'red'
957-
>>> turtle.pencolor("brown")
958-
>>> turtle.pencolor()
959-
'brown'
960-
>>> tup = (0.2, 0.8, 0.55)
961-
>>> turtle.pencolor(tup)
962-
>>> turtle.pencolor()
963-
(0.2, 0.8, 0.5490196078431373)
964-
>>> colormode(255)
965-
>>> turtle.pencolor()
966-
(51.0, 204.0, 140.0)
967-
>>> turtle.pencolor('#32c18f')
968-
>>> turtle.pencolor()
969-
(50.0, 193.0, 143.0)
953+
>>> colormode()
954+
1.0
955+
>>> turtle.pencolor()
956+
'red'
957+
>>> turtle.pencolor("brown")
958+
>>> turtle.pencolor()
959+
'brown'
960+
>>> tup = (0.2, 0.8, 0.55)
961+
>>> turtle.pencolor(tup)
962+
>>> turtle.pencolor()
963+
(0.2, 0.8, 0.5490196078431373)
964+
>>> colormode(255)
965+
>>> turtle.pencolor()
966+
(51.0, 204.0, 140.0)
967+
>>> turtle.pencolor('#32c18f')
968+
>>> turtle.pencolor()
969+
(50.0, 193.0, 143.0)
970970

971971

972972
.. function:: fillcolor(*args)
@@ -999,17 +999,17 @@ Color control
999999
.. doctest::
10001000
:skipif: _tkinter is None
10011001

1002-
>>> turtle.fillcolor("violet")
1003-
>>> turtle.fillcolor()
1004-
'violet'
1005-
>>> turtle.pencolor()
1006-
(50.0, 193.0, 143.0)
1007-
>>> turtle.fillcolor((50, 193, 143)) # Integers, not floats
1008-
>>> turtle.fillcolor()
1009-
(50.0, 193.0, 143.0)
1010-
>>> turtle.fillcolor('#ffffff')
1011-
>>> turtle.fillcolor()
1012-
(255.0, 255.0, 255.0)
1002+
>>> turtle.fillcolor("violet")
1003+
>>> turtle.fillcolor()
1004+
'violet'
1005+
>>> turtle.pencolor()
1006+
(50.0, 193.0, 143.0)
1007+
>>> turtle.fillcolor((50, 193, 143)) # Integers, not floats
1008+
>>> turtle.fillcolor()
1009+
(50.0, 193.0, 143.0)
1010+
>>> turtle.fillcolor('#ffffff')
1011+
>>> turtle.fillcolor()
1012+
(255.0, 255.0, 255.0)
10131013

10141014

10151015
.. function:: color(*args)
@@ -1038,12 +1038,12 @@ Color control
10381038
.. doctest::
10391039
:skipif: _tkinter is None
10401040

1041-
>>> turtle.color("red", "green")
1042-
>>> turtle.color()
1043-
('red', 'green')
1044-
>>> color("#285078", "#a0c8f0")
1045-
>>> color()
1046-
((40.0, 80.0, 120.0), (160.0, 200.0, 240.0))
1041+
>>> turtle.color("red", "green")
1042+
>>> turtle.color()
1043+
('red', 'green')
1044+
>>> color("#285078", "#a0c8f0")
1045+
>>> color()
1046+
((40.0, 80.0, 120.0), (160.0, 200.0, 240.0))
10471047

10481048

10491049
See also: Screen method :func:`colormode`.
@@ -1065,11 +1065,11 @@ Filling
10651065
.. doctest::
10661066
:skipif: _tkinter is None
10671067

1068-
>>> turtle.begin_fill()
1069-
>>> if turtle.filling():
1070-
... turtle.pensize(5)
1071-
... else:
1072-
... turtle.pensize(3)
1068+
>>> turtle.begin_fill()
1069+
>>> if turtle.filling():
1070+
... turtle.pensize(5)
1071+
... else:
1072+
... turtle.pensize(3)
10731073

10741074

10751075

@@ -1275,11 +1275,11 @@ Appearance
12751275
.. doctest::
12761276
:skipif: _tkinter is None
12771277

1278-
>>> turtle.shape("circle")
1279-
>>> turtle.shapesize(5,2)
1280-
>>> turtle.shearfactor(0.5)
1281-
>>> turtle.shearfactor()
1282-
0.5
1278+
>>> turtle.shape("circle")
1279+
>>> turtle.shapesize(5,2)
1280+
>>> turtle.shearfactor(0.5)
1281+
>>> turtle.shearfactor()
1282+
0.5
12831283

12841284

12851285
.. function:: tilt(angle)
@@ -1648,11 +1648,11 @@ Window control
16481648
``"nopic"``, delete background image, if present. If *picname* is ``None``,
16491649
return the filename of the current backgroundimage. ::
16501650

1651-
>>> screen.bgpic()
1652-
'nopic'
1653-
>>> screen.bgpic("landscape.gif")
1654-
>>> screen.bgpic()
1655-
"landscape.gif"
1651+
>>> screen.bgpic()
1652+
'nopic'
1653+
>>> screen.bgpic("landscape.gif")
1654+
>>> screen.bgpic()
1655+
"landscape.gif"
16561656

16571657

16581658
.. function:: clear()
@@ -2059,16 +2059,16 @@ Settings and special methods
20592059

20602060
Return the height of the turtle window. ::
20612061

2062-
>>> screen.window_height()
2063-
480
2062+
>>> screen.window_height()
2063+
480
20642064

20652065

20662066
.. function:: window_width()
20672067

20682068
Return the width of the turtle window. ::
20692069

2070-
>>> screen.window_width()
2071-
640
2070+
>>> screen.window_width()
2071+
640
20722072

20732073

20742074
.. _screenspecific:
@@ -2249,12 +2249,12 @@ facilities:
22492249
in the range 0..colormode or a 3-tuple of such numbers.
22502250

22512251

2252-
>>> screen.bgcolor("orange")
2253-
>>> screen.bgcolor()
2254-
"orange"
2255-
>>> screen.bgcolor(0.5,0,0.5)
2256-
>>> screen.bgcolor()
2257-
"#800080"
2252+
>>> screen.bgcolor("orange")
2253+
>>> screen.bgcolor()
2254+
"orange"
2255+
>>> screen.bgcolor(0.5,0,0.5)
2256+
>>> screen.bgcolor()
2257+
"#800080"
22582258

22592259
>>> help(Turtle.penup)
22602260
Help on method penup in module turtle:

0 commit comments

Comments
 (0)
0