mirror of
https://github.com/python/cpython.git
synced 2025-11-13 15:40:05 +00:00
Sometimes a class is used as a base class of itself. Obviously there's
something I don't understand, but for now ignore this. Output the file name such that it cannot contain non-ascii characters.
This commit is contained in:
parent
d6ab153e5a
commit
8307e028b2
1 changed files with 6 additions and 2 deletions
|
|
@ -409,7 +409,7 @@ def compileaete(aete, resinfo, fname, output=None, basepkgname=None,
|
||||||
fp = open(initfilename, 'w')
|
fp = open(initfilename, 'w')
|
||||||
MacOS.SetCreatorAndType(initfilename, 'Pyth', 'TEXT')
|
MacOS.SetCreatorAndType(initfilename, 'Pyth', 'TEXT')
|
||||||
fp.write('"""\n')
|
fp.write('"""\n')
|
||||||
fp.write("Package generated from %s\n"%fname)
|
fp.write("Package generated from %s\n"%ascii(fname))
|
||||||
if resinfo:
|
if resinfo:
|
||||||
fp.write("Resource %s resid %d %s\n"%(ascii(resinfo[1]), resinfo[0], ascii(resinfo[2])))
|
fp.write("Resource %s resid %d %s\n"%(ascii(resinfo[1]), resinfo[0], ascii(resinfo[2])))
|
||||||
fp.write('"""\n')
|
fp.write('"""\n')
|
||||||
|
|
@ -913,6 +913,10 @@ class ObjectCompiler:
|
||||||
for superclass in superclasses:
|
for superclass in superclasses:
|
||||||
superId, superDesc, dummy = superclass
|
superId, superDesc, dummy = superclass
|
||||||
superclassname, fullyqualifiedname, module = self.findcodename("class", superId)
|
superclassname, fullyqualifiedname, module = self.findcodename("class", superId)
|
||||||
|
# I don't think this is correct:
|
||||||
|
if superclassname == cname:
|
||||||
|
pass # superclassnames.append(fullyqualifiedname)
|
||||||
|
else:
|
||||||
superclassnames.append(superclassname)
|
superclassnames.append(superclassname)
|
||||||
|
|
||||||
if self.fp:
|
if self.fp:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue