Revert unneccessary changes made in bpo-30296 and apply other improvements. (GH-2624)
(cherry picked from commit 3f2e6f15d64d81633b1fc0b308afc0d6e9026b61)
Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
diff --git a/Lib/turtle.py b/Lib/turtle.py
index 8909fe9..9db564b 100644
--- a/Lib/turtle.py
+++ b/Lib/turtle.py
@@ -3839,7 +3839,7 @@
docsdict[key] = eval(key).__doc__
with open("%s.py" % filename,"w") as f:
- keys = sorted(x for x in docsdict.keys()
+ keys = sorted(x for x in docsdict
if x.split('.')[1] not in _alias_list)
f.write('docsdict = {\n\n')
for key in keys[:-1]: