[Zope] Trailing 'L' after number values

Jason Byron jason_zope@yahoo.com
Sun, 13 May 2001 11:02:13 -0700 (PDT)


--- Neil Blue <neilblue@bigfoot.com> wrote:
> Hello,
> 
> I am getting integer numbers from mysql with a
> select clause. The values 
> are stored as int types, however when I retrieve
> them via a Z SQL method 
> and show them on a page, they display with a
> trailing 'L'.
> 
> e.g.
> 
> 12L
> 
> instead of
> 
> 12
> 
> Does anyone know why this happens. It also occurs
> when I test an sql 
> statement. However it has only recently started to
> do this and I am not 
> sure why.
> 

You may have updated your database adapter.  this
is the defalt behavior for python 1.5.  It
happened to me when I moved from one database 
adapter (and python interface) to another.  
You'll just have to cast your results to an 
int for now (int(val) or "_.int(val)").

I've heard that the behavior of python 2 changes
this.

jason





__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/