mirror of
https://github.com/python/cpython.git
synced 2025-09-15 13:16:12 +00:00
Fixed incorrect logic in determining whether we should initialize
the classes' attribute list.
This commit is contained in:
parent
3cfdc3402e
commit
7ff034b65b
1 changed files with 1 additions and 2 deletions
|
@ -295,7 +295,7 @@ def compileaete(aete, resinfo, fname):
|
||||||
|
|
||||||
# Generate property dicts and element dicts for all types declared in this module
|
# Generate property dicts and element dicts for all types declared in this module
|
||||||
fp.write("def getbaseclasses(v):\n")
|
fp.write("def getbaseclasses(v):\n")
|
||||||
fp.write("\tif hasattr(v, '_superclassnames') and v._superclassnames:\n")
|
fp.write("\tif hasattr(v, '_superclassnames') and not hasattr(v, '_propdict'):\n")
|
||||||
fp.write("\t\tv._propdict = {}\n")
|
fp.write("\t\tv._propdict = {}\n")
|
||||||
fp.write("\t\tv._elemdict = {}\n")
|
fp.write("\t\tv._elemdict = {}\n")
|
||||||
fp.write("\t\tfor superclass in v._superclassnames:\n")
|
fp.write("\t\tfor superclass in v._superclassnames:\n")
|
||||||
|
@ -304,7 +304,6 @@ def compileaete(aete, resinfo, fname):
|
||||||
fp.write("\t\t\tv._elemdict.update(getattr(eval(superclass), '_privelemdict', {}))\n")
|
fp.write("\t\t\tv._elemdict.update(getattr(eval(superclass), '_privelemdict', {}))\n")
|
||||||
fp.write("\t\tv._propdict.update(v._privpropdict)\n")
|
fp.write("\t\tv._propdict.update(v._privpropdict)\n")
|
||||||
fp.write("\t\tv._elemdict.update(v._privelemdict)\n")
|
fp.write("\t\tv._elemdict.update(v._privelemdict)\n")
|
||||||
fp.write("\t\tv._superclassnames = None\n")
|
|
||||||
fp.write("\n")
|
fp.write("\n")
|
||||||
fp.write("import StdSuites\n")
|
fp.write("import StdSuites\n")
|
||||||
if allprecompinfo:
|
if allprecompinfo:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue