This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author retoo
Recipients aronacher, benjamin.peterson, collinwinter, crmccreary, georg.brandl, retoo
Date 2008-12-10.14:44:42
SpamBayes Score 0.00016861
Marked as misclassified No
Message-id <1228920284.09.0.318119758916.issue2734@psf.upfronthosting.co.za>
In-reply-to
Content
This is even worse in case of attributes (like in pyephem for the
observer object):


  class Foo(object):
      def __init__(self):
          self.long = 1
          
  x = Foo()
  print x.long


2to3 produces:


--- attr.py (original)
+++ attr.py (refactored)
@@ -1,6 +1,6 @@
 class Foo(object):
     def __init__(self):
-        self.long = 1
+        self.int = 1
         
 x = Foo()
-print x.long
+print(x.int)


I think 2to3 shouldn't refactor any attribute names. I doubt anybody
would access the type long using an attribute :).

Cheers,
Reto
History
Date User Action Args
2008-12-10 14:44:44retoosetrecipients: + retoo, georg.brandl, collinwinter, benjamin.peterson, aronacher, crmccreary
2008-12-10 14:44:44retoosetmessageid: <1228920284.09.0.318119758916.issue2734@psf.upfronthosting.co.za>
2008-12-10 14:44:43retoolinkissue2734 messages
2008-12-10 14:44:43retoocreate