classification
Title: Broken turtle example in Cmd documentation
Type: behavior Stage: resolved
Components: Documentation Versions: Python 3.4
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: docs@python Nosy List: bbc, docs@python, ethan.furman
Priority: normal Keywords:

Created on 2014-12-17 21:28 by bbc, last changed 2014-12-18 00:44 by ethan.furman. This issue is now closed.

Messages (5)
msg232829 - (view) Author: (bbc) Date: 2014-12-17 21:28
The documentation page for the cmd module contains an example with the turtle module:

https://docs.python.org/3.4/library/cmd.html#cmd-example

It seems like the turtle module has changed quite a bit since the code was written, and exposes a Pen class instead of all the various movement functions.  The example, while still useful, cannot be executed as is.

I like the example and would be happy to provide an idiomatic replacement if you think this is necessary.
msg232834 - (view) Author: Ethan Furman (ethan.furman) * (Python committer) Date: 2014-12-17 23:29
Please do!  Working examples are better than non-working ones.  :)
msg232835 - (view) Author: Ethan Furman (ethan.furman) * (Python committer) Date: 2014-12-17 23:30
While you're at it, could you also sign the contributors' license agreement?

https://www.python.org/psf/contrib/contrib-form/
msg232847 - (view) Author: (bbc) Date: 2014-12-18 00:42
It turns out the script is fine.  I could have investigated it more thoroughly at first if I had more carefully read the docs for turtle.

I thought those functions were not exposed because they were reportedly not found after I copy-pasted, executed the example script and entered commands.  The reason was my file was named turtle.py.

Sorry for the noise.
msg232848 - (view) Author: Ethan Furman (ethan.furman) * (Python committer) Date: 2014-12-18 00:44
No worries, thanks for following up.
History
Date User Action Args
2014-12-18 00:44:11ethan.furmansetstatus: open -> closed
resolution: not a bug
messages: + msg232848

stage: resolved
2014-12-18 00:42:24bbcsetmessages: + msg232847
2014-12-17 23:30:48ethan.furmansetmessages: + msg232835
2014-12-17 23:29:13ethan.furmansetnosy: + ethan.furman
messages: + msg232834
2014-12-17 21:28:40bbccreate