mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
Not all objects have an _propdict and _privpropdict, so cater for that.
This commit is contained in:
parent
51f8d38185
commit
7cb016db80
1 changed files with 3 additions and 3 deletions
|
@ -387,7 +387,7 @@ def compileaete(aete, resinfo, fname, output=None, basepkgname=None,
|
|||
|
||||
# Generate property dicts and element dicts for all types declared in this module
|
||||
fp.write("\ndef getbaseclasses(v):\n")
|
||||
fp.write("\tif not v._propdict:\n")
|
||||
fp.write("\tif not getattr(v, '_propdict', None):\n")
|
||||
fp.write("\t\tv._propdict = {}\n")
|
||||
fp.write("\t\tv._elemdict = {}\n")
|
||||
fp.write("\t\tfor superclassname in getattr(v, '_superclassnames', []):\n")
|
||||
|
@ -395,8 +395,8 @@ def compileaete(aete, resinfo, fname, output=None, basepkgname=None,
|
|||
fp.write("\t\t\tgetbaseclasses(superclass)\n")
|
||||
fp.write("\t\t\tv._propdict.update(getattr(superclass, '_propdict', {}))\n")
|
||||
fp.write("\t\t\tv._elemdict.update(getattr(superclass, '_elemdict', {}))\n")
|
||||
fp.write("\t\tv._propdict.update(v._privpropdict)\n")
|
||||
fp.write("\t\tv._elemdict.update(v._privelemdict)\n")
|
||||
fp.write("\t\tv._propdict.update(getattr(v, '_privpropdict', {}))\n")
|
||||
fp.write("\t\tv._elemdict.update(getattr(v, '_privelemdict', {}))\n")
|
||||
fp.write("\n")
|
||||
fp.write("import StdSuites\n")
|
||||
if allprecompinfo:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue