Numbers in SQL statements

Aahz Maruch aahz at netcom.com
Fri Nov 5 18:40:57 EST 1999


In article <38235836.D2F9A909 at src.uchicago.edu>,
Nick Collier  <nick at src.uchicago.edu> wrote:
>
>I've been testing if the value is a number whose string representation
>ends with "L" and then stripping the "L", but am pretty sure there must
>be a better way. If so, any suggestions as to what is?

if type(foo) = types.LongType :
  return ( str(foo)[:-1] )
else :
  return ( str(foo) )
--
                      --- Aahz (@netcom.com)

Androgynous poly kinky vanilla queer het    <*>      http://www.rahul.net/aahz/
Hugs and backrubs -- I break Rule 6  (if you want to know, do some research)




More information about the Python-list mailing list