RELEASED Python 2.3 (final)

Robin Becker robin at jessikat.fsnet.co.uk
Thu Jul 31 07:09:09 EDT 2003


I've been testing reportlab with 2.3 and although it's a lot faster I
get some ominous warnings and complaints from the future.

1) SyntaxWarning: assignment to None
   eg for None, name in colorNamePairs:
   what is the preferred way to do this nowadays? It's fairly
   trivial to go through and change these to for notUsed, x in ....
   but is there a nicer way.

2) FutureWarning: hex/oct constants > sys.maxint will return positive  
   values in Python 2.4 and up
   eg self.assertEquals(ttf.read_ulong(), 0x81020304) # big-endian
   Is there no way to preserve the clarity of the above in future?
   We have quite a lot of code that deals with low level binary 
   formatted stuff. Changing will move it further away from the
   original C definitions.

   The same applies to

   FutureWarning: x<<y losing bits or changing sign will return a long 
   in Python 2.4 and up
   eg sum = (hi << 16) | (lo & 0xFFFF)

   Is Python moving away from the machinery? Are there efficient
   recipes for doing these 32 bit operations? Certainly cut and
   paste to and from java/c/c++ will be a lot harder.

Apart from these minor troubles seems pretty solid.
-- 
Robin Becker




More information about the Python-list mailing list