Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commita01ad52

Browse files
miss-islingtonhugovkCAM-Gerlach
authored
gh-101100: Fix Sphinx warnings inturtle module (GH-102340)
(cherry picked from commit78e4e6c)Co-authored-by: Hugo van Kemenade <hugovk@users.noreply.github.com>Co-authored-by: C.A.M. Gerlach <CAM.Gerlach@Gerlach.CAM>
1 parent5bdcb08 commita01ad52

File tree

2 files changed

+32
-28
lines changed

2 files changed

+32
-28
lines changed

‎Doc/library/turtle.rst

Lines changed: 31 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,7 +1214,7 @@ Appearance
12141214
will be displayed stretched according to its stretchfactors: *stretch_wid* is
12151215
stretchfactor perpendicular to its orientation, *stretch_len* is
12161216
stretchfactor in direction of its orientation, *outline* determines the width
1217-
of theshapes's outline.
1217+
of theshape's outline.
12181218

12191219
..doctest::
12201220
:skipif: _tkinter is None
@@ -1545,7 +1545,7 @@ below:
15451545

15461546
1. Create an empty Shape object of type "compound".
15471547
2. Add as many components to this object as desired, using the
1548-
:meth:`addcomponent` method.
1548+
:meth:`~Shape.addcomponent` method.
15491549

15501550
For example:
15511551

@@ -2125,7 +2125,7 @@ Public classes
21252125

21262126
:param cv: a:class:`tkinter.Canvas`
21272127

2128-
Provides screen oriented methods like:func:`setbg` etc. that are described
2128+
Provides screen oriented methods like:func:`bgcolor` etc. that are described
21292129
above.
21302130

21312131
..class::Screen()
@@ -2315,7 +2315,9 @@ of this module or which better fits to your needs, e.g. for use in a classroom,
23152315
you can prepare a configuration file ``turtle.cfg`` which will be read at import
23162316
time and modify the configuration according to its settings.
23172317

2318-
The built in configuration would correspond to the following turtle.cfg::
2318+
The built in configuration would correspond to the following ``turtle.cfg``:
2319+
2320+
..code-block::ini
23192321
23202322
width = 0.5
23212323
height = 0.75
@@ -2340,15 +2342,15 @@ The built in configuration would correspond to the following turtle.cfg::
23402342
23412343
Short explanation of selected entries:
23422344

2343-
- The first four lines correspond to the arguments of the:meth:`Screen.setup`
2345+
- The first four lines correspond to the arguments of the:func:`Screen.setup <setup>`
23442346
method.
23452347
- Line 5 and 6 correspond to the arguments of the method
2346-
:meth:`Screen.screensize`.
2348+
:func:`Screen.screensize <screensize>`.
23472349
- *shape* can be any of the built-in shapes, e.g: arrow, turtle, etc. For more
23482350
info try ``help(shape)``.
2349-
- If you want to use nofillcolor (i.e. make the turtle transparent), you have
2351+
- If you want to use nofill color (i.e. make the turtle transparent), you have
23502352
to write ``fillcolor = ""`` (but all nonempty strings must not have quotes in
2351-
the cfg-file).
2353+
the cfgfile).
23522354
- If you want to reflect the turtle its state, you have to use ``resizemode =
23532355
auto``.
23542356
- If you set e.g. ``language = italian`` the docstringdict
@@ -2398,6 +2400,8 @@ The :mod:`turtledemo` package directory contains:
23982400

23992401
The demo scripts are:
24002402

2403+
..currentmodule::turtle
2404+
24012405
..tabularcolumns::|l|L|L|
24022406

24032407
+----------------+------------------------------+-----------------------+
@@ -2469,44 +2473,44 @@ Have fun!
24692473
Changes since Python 2.6
24702474
========================
24712475

2472-
- The methods:meth:`Turtle.tracer`,:meth:`Turtle.window_width` and
2473-
:meth:`Turtle.window_height` have been eliminated.
2476+
- The methods:func:`Turtle.tracer <tracer>`,:func:`Turtle.window_width <window_width>` and
2477+
:func:`Turtle.window_height <window_height>` have been eliminated.
24742478
Methods with these names and functionality are now available only
24752479
as methods of:class:`Screen`. The functions derived from these remain
24762480
available. (In fact already in Python 2.6 these methods were merely
24772481
duplications of the corresponding
2478-
:class:`TurtleScreen`/:class:`Screen`-methods.)
2482+
:class:`TurtleScreen`/:class:`Screen`methods.)
24792483

2480-
- The method:meth:`Turtle.fill` has been eliminated.
2481-
The behaviour of:meth:`begin_fill` and:meth:`end_fill`
2482-
have changed slightly: nowevery filling-process must be completed with an
2484+
- The method:func:`!Turtle.fill` has been eliminated.
2485+
The behaviour of:func:`begin_fill` and:func:`end_fill`
2486+
have changed slightly: now every fillingprocess must be completed with an
24832487
``end_fill()`` call.
24842488

2485-
- A method:meth:`Turtle.filling` has been added. It returns a boolean
2489+
- A method:func:`Turtle.filling <filling>` has been added. It returns a boolean
24862490
value: ``True`` if a filling process is under way, ``False`` otherwise.
24872491
This behaviour corresponds to a ``fill()`` call without arguments in
24882492
Python 2.6.
24892493

24902494
Changes since Python 3.0
24912495
========================
24922496

2493-
- The methods:meth:`Turtle.shearfactor`,:meth:`Turtle.shapetransform` and
2494-
:meth:`Turtle.get_shapepoly` have been added. Thus the full range of
2497+
- The:class:`Turtle`methods:func:`shearfactor`,:func:`shapetransform` and
2498+
:func:`get_shapepoly` have been added. Thus the full range of
24952499
regular linear transforms is now available for transforming turtle shapes.
2496-
:meth:`Turtle.tiltangle` has been enhanced in functionality: it now can
2497-
be used to get or set thetiltangle.:meth:`Turtle.settiltangle` has been
2500+
:func:`tiltangle` has been enhanced in functionality: it now can
2501+
be used to get or set thetilt angle.:func:`settiltangle` has been
24982502
deprecated.
24992503

2500-
- The method:meth:`Screen.onkeypress` has been added as a complement to
2501-
:meth:`Screen.onkey` which in fact binds actions to thekeyreleaseevent.
2502-
Accordingly the latter has gotan alias::meth:`Screen.onkeyrelease`.
2504+
- The:class:`Screen`method:func:`onkeypress` has been added as a complement to
2505+
:func:`onkey`. As the latter binds actions to thekey releaseevent,
2506+
an alias::func:`onkeyrelease` was also added for it.
25032507

2504-
- The method:meth:`Screen.mainloop` has been added. So when working only
2505-
with Screen and Turtle objects one must not additionally import
2506-
:func:`mainloop` anymore.
2508+
- The method:func:`Screen.mainloop <mainloop>` has been added,
2509+
so there is no longer a need to use the standalone:func:`mainloop` function
2510+
when working with:class:`Screen` and:class:`Turtle` objects.
25072511

2508-
- Two input methodshas been added:meth:`Screen.textinput` and
2509-
:meth:`Screen.numinput`. Thesepopup input dialogs and return
2512+
- Two input methodshave been added::func:`Screen.textinput <textinput>` and
2513+
:func:`Screen.numinput <numinput>`. Thesepop up input dialogs and return
25102514
strings and numbers respectively.
25112515

25122516
- Two example scripts:file:`tdemo_nim.py` and:file:`tdemo_round_dance.py`

‎Lib/turtle.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -953,7 +953,7 @@ def __repr__(self):
953953

954954

955955
classTurtleScreen(TurtleScreenBase):
956-
"""Provides screen oriented methods likesetbg etc.
956+
"""Provides screen oriented methods likebgcolor etc.
957957
958958
Only relies upon the methods of TurtleScreenBase and NOT
959959
upon components of the underlying graphics toolkit -

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp