Screen和Turtle类的公共方法通过docstrings广泛记录。所以这些可以通过Python帮助工具用作在线帮助:
使用IDLE时,工具提示会显示函数/方法调用中键入的文档字符串的签名和第一行。
调用help()方法或函数会显示文档字符串:
help(Screen.bgcolor)
Help on method bgcolor in module turtle:
bgcolor(self, *args) unbound turtle.Screen method
Set or return backgroundcolor of the TurtleScreen.
Arguments (if given): a color string or three numbers
in the range 0..colormode or a 3-tuple of such numbers.
>>> screen.bgcolor("orange")
>>> screen.bgcolor()
"orange"
>>> screen.bgcolor(0.5,0,0.5)
>>> screen.bgcolor()
"#800080"
help(Turtle.penup)
Help on method penup in module turtle:
penup(self) unbound turtle.Turtle method