mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
Only output the code to alias properties if the names aren't the same.
This commit is contained in:
parent
93ff482c21
commit
9d6d2c0c97
1 changed files with 2 additions and 0 deletions
|
@ -670,6 +670,8 @@ class ObjectCompiler:
|
|||
if self.namemappers[0].hascode('property', code):
|
||||
# plural forms and such
|
||||
othername, dummy, dummy = self.namemappers[0].findcodename('property', code)
|
||||
if pname == othername:
|
||||
return
|
||||
if self.fp:
|
||||
self.fp.write("\n%s = %s\n"%(pname, othername))
|
||||
else:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue