diff options
author | Jack Jansen <jack.jansen@cwi.nl> | 2003-04-12 22:27:11 (GMT) |
---|---|---|
committer | Jack Jansen <jack.jansen@cwi.nl> | 2003-04-12 22:27:11 (GMT) |
commit | 3576066cad445e0b3870766fa661b534f9799de7 (patch) | |
tree | a0251816bb4ef3bbc54468d20e752a3896a9f827 /Lib/plat-mac/gensuitemodule.py | |
parent | 7b01a83488ebe1969b416d579e7df58576bb3c44 (diff) | |
download | cpython-3576066cad445e0b3870766fa661b534f9799de7.zip cpython-3576066cad445e0b3870766fa661b534f9799de7.tar.gz cpython-3576066cad445e0b3870766fa661b534f9799de7.tar.bz2 |
Oops, _propdeclarations and friends are needed: gensuitemodule uses them
to lookup properties declared in base classes. Looking at it I'm not sure
what the official scope if the property codes is, maybe it is only the
(OSA) class in which they are used. But giving them global scope hasn't been
a problem so far.
Regenerated the standard suites, which are now also space-indented.
Diffstat (limited to 'Lib/plat-mac/gensuitemodule.py')
-rw-r--r-- | Lib/plat-mac/gensuitemodule.py | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/Lib/plat-mac/gensuitemodule.py b/Lib/plat-mac/gensuitemodule.py index 622016e..d7206ff 100644 --- a/Lib/plat-mac/gensuitemodule.py +++ b/Lib/plat-mac/gensuitemodule.py @@ -987,8 +987,6 @@ class ObjectCompiler: if self.fp: self.fp.write("\n_Prop_%s = _Prop_%s\n"%(pname, othername)) else: - if self.hasname(pname): - pass if self.fp: self.fp.write("class _Prop_%s(aetools.NProperty):\n" % pname) self.fp.write(' """%s - %s """\n' % (ascii(name), ascii(what[1]))) @@ -1108,26 +1106,26 @@ class ObjectCompiler: self.fp.write(" %s : %s,\n" % (`k`, v)) self.fp.write("}\n") -## self.fp.write("\n_propdeclarations = {\n") -## proplist = self.namemappers[0].getall('property') -## proplist.sort() -## for k, v in proplist: -## self.fp.write(" %s : _Prop_%s,\n" % (`k`, v)) -## self.fp.write("}\n") -## -## self.fp.write("\n_compdeclarations = {\n") -## complist = self.namemappers[0].getall('comparison') -## complist.sort() -## for k, v in complist: -## self.fp.write(" %s : %s,\n" % (`k`, v)) -## self.fp.write("}\n") -## -## self.fp.write("\n_enumdeclarations = {\n") -## enumlist = self.namemappers[0].getall('enum') -## enumlist.sort() -## for k, v in enumlist: -## self.fp.write(" %s : %s,\n" % (`k`, v)) -## self.fp.write("}\n") + self.fp.write("\n_propdeclarations = {\n") + proplist = self.namemappers[0].getall('property') + proplist.sort() + for k, v in proplist: + self.fp.write(" %s : _Prop_%s,\n" % (`k`, v)) + self.fp.write("}\n") + + self.fp.write("\n_compdeclarations = {\n") + complist = self.namemappers[0].getall('comparison') + complist.sort() + for k, v in complist: + self.fp.write(" %s : %s,\n" % (`k`, v)) + self.fp.write("}\n") + + self.fp.write("\n_enumdeclarations = {\n") + enumlist = self.namemappers[0].getall('enum') + enumlist.sort() + for k, v in enumlist: + self.fp.write(" %s : %s,\n" % (`k`, v)) + self.fp.write("}\n") def compiledata(data): [type, description, flags] = data |