cpython: 1628484c9408 (original) (raw)

--- a/Lib/turtle.py +++ b/Lib/turtle.py @@ -1288,7 +1288,7 @@ class TurtleScreen(TurtleScreenBase): def _incrementudc(self): """Increment update counter.""" if not TurtleScreen._RUNNING:

@@ -3754,7 +3754,7 @@ class _Screen(TurtleScreen): Turtle._screen = None _Screen._root = None _Screen._canvas = None

def bye(self): @@ -3795,7 +3795,6 @@ class _Screen(TurtleScreen): except AttributeError: exit(0) - class Turtle(RawTurtle): """RawTurtle auto-creating (scrolled) canvas. @@ -3818,18 +3817,6 @@ class Turtle(RawTurtle): Pen = Turtle -def _getpen():

- -def _getscreen():

- def write_docstringdict(filename="turtle_docstringdict"): """Create and write docstring-dictionary to file. @@ -3952,26 +3939,38 @@ def _screen_docrevise(docstr):

as functions. So we can enhance, change, add, delete methods to these

classes and do not need to change anything here.

- -for methodname in _tg_screen_functions:

- -for methodname in _tg_turtle_functions:

+__func_body = """[](#l1.72) +def {name}{paramslist}:

+""" + +def _make_global_funcs(functions, cls, obj, init, docrevise):

+ +_make_global_funcs(_tg_screen_functions, _Screen,

+_make_global_funcs(_tg_turtle_functions, Turtle,

done = mainloop

--- a/Lib/turtledemo/main.py +++ b/Lib/turtledemo/main.py @@ -344,6 +344,8 @@ class DemoWindow(object): else: self.state = DONE except turtle.Terminator:

@@ -369,7 +371,9 @@ class DemoWindow(object): turtle.TurtleScreen._RUNNING = False def _destroy(self):

def main():

--- a/Misc/NEWS +++ b/Misc/NEWS @@ -13,6 +13,9 @@ Core and Builtins Library ------- +- Issue #6639: Module-level turtle functions no longer raise TclError after