[Python-Dev] str(1L) -> '1' ?

Jim Fulton jim@digicool.com
Thu, 23 Dec 1999 09:41:23 -0500


In November there was an interesting discussion on comp.lang.python 
about the meaning of __str__ and __repr__.  One tidbit that came out
of this discussion was that __str__ for longs should drop the trailing 
'L'. Was there a decision on this? I'd really like this to happen.

We do alot of work with RDBMS systems and long integers seem to
come up alot with these systems (as do other fix-decimal number, 
but that's another topic ;).  For example, our latest Sybase and
Oracle support in Zope returns long integers for RDBMS types
like NUMBER(10,0).  The trailing 'L' in the string representation
is causeing us some headaches.  This seems also to be an issue when
using the current standard ODBC interface with Oracle, as indicated
in a DB-SIG post today.

Jim

--
Jim Fulton           mailto:jim@digicool.com   Python Powered!        
Technical Director   (888) 344-4332            http://www.python.org  
Digital Creations    http://www.digicool.com   http://www.zope.org    

Under US Code Title 47, Sec.227(b)(1)(C), Sec.227(a)(2)(B) This email
address may not be added to any commercial mail list with out my
permission.  Violation of my privacy with advertising or SPAM will
result in a suit for a MINIMUM of $500 damages/incident, $1500 for
repeats.