[issue12831] 2to3 and integer division

2011-08-26 Thread Raymond Hettinger
Raymond Hettinger added the comment: Running python with the -3 command line option will warn about Python 3.x incompatibilities that 2to3 cannot trivially fix. -- nosy: +rhettinger ___ Python tracker ___

[issue12831] 2to3 and integer division

2011-08-26 Thread Alexander Rødseth
Alexander Rødseth added the comment: Even though it's hard to cover every case, it should be possible in quite a few cases: self.maxstars = 4 half = self.maxstars / 2 -- ___ Python tracker __

[issue12831] 2to3 and integer division

2011-08-25 Thread Mark Dickinson
Changes by Mark Dickinson : -- nosy: +benjamin.peterson resolution: -> invalid status: open -> closed ___ Python tracker ___ ___ Pyth

[issue12831] 2to3 and integer division

2011-08-25 Thread Mark Dickinson
Mark Dickinson added the comment: > "/ 2" is an integer division, so it should be "// 3" in Python 3. No, I don't think that's right: 2to3 has no way of knowing that the programmer intended an integer division here (self.maxstars could be a float). Instead, you should always use '//' in Pytho

[issue12831] 2to3 and integer division

2011-08-24 Thread Alexander Rødseth
New submission from Alexander Rødseth : Hi, 2to3 is a great tool, but I think I found one case it doesn't catch, which is this change: -half = self.maxstars / 2 +half = self.maxstars // 2 "/ 2" is an integer division, so it should be "// 3" in Python 3. Thanks. -- co