Reto Schüttel <[EMAIL PROTECTED]> added the comment:

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

----------
nosy: +retoo

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2734>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to