File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed
Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -228,7 +228,7 @@ def pendown(self):
228228################################################## procedural API
229229
230230# _install_command() will append more names when the module loads
231- __all__ = ['Turtle' , 'make_turtle' ]
231+ __all__ = ['Turtle' , 'make_turtle' , 'get_turtle' ]
232232
233233
234234def __dir__ ():
@@ -239,13 +239,15 @@ def __dir__():
239239
240240
241241def make_turtle (delay = 0 ):
242+ """Makes and sets new _main_turtle"""
242243 global _main_turtle
243244 _main_turtle = Turtle (delay )
244245
245246
246- def _get_turtle ():
247+ def get_turtle ():
248+ """Gets _main_turtle; makes it if there's none"""
247249 global _main_turtle
248- if not _main_turtle :
250+ if _main_turtle is None :
249251 _main_turtle = Turtle ()
250252 return _main_turtle
251253
You can’t perform that action at this time.
0 commit comments