[GRASS-dev] Changes between Python 2 and Python 3 that might need attention in GRASS

Moritz Lennert mlennert at club.worldonline.be
Mon Jan 13 08:25:53 PST 2014


On 13/01/14 16:13, Vaclav Petras wrote:>
> One important change I stumbled upon recently is that integer
> division results in float in python 3, while it resulted in integer
> in python 2. So any module that relies on integer division resulting
> in integer will need to be updated. I have no idea if such situations
> exist, though.
>
> If it is as you say, you may mention that in some separate email
> thread and not hidden here in a wxPython GUI thread.

Your wish is my command ! ;-)

Here's the doc:

http://docs.python.org/3/whatsnew/3.0.html

Issues I think might need attention (but this is without verification 
within the grass python code):

- Print Is A Function
- Views And Iterators Instead Of Lists
- PEP 0238: An expression like 1/2 returns a float. Use 1//2 to get the 
truncating behavior.
- Text Vs. Data Instead Of Unicode Vs. 8-bit

Moritz


More information about the grass-dev mailing list