isinstance() necessary and helpful, sometimes
Aahz Maruch
aahz at panix.com
Fri Feb 1 12:46:07 EST 2002
More information about the Python-list mailing list
Fri Feb 1 12:46:07 EST 2002
- Previous message (by thread): calling upper constructor
- Next message (by thread): finding a module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
In article <a2r97q$dpi$1 at serv1.iunet.it>, Alex Martelli <aleax at aleax.it> wrote: > >Wouldn't we want in this case to treat X**1.0 the same as X**1 the >same as X**1L...? A test such as exponent==int(exponent) would >then seem to be more general and useful than isinstance(exponent,int). I'd tend to code exponent==long(exponent) if I were targetting versions of Python < 2.2. -- --- Aahz <*> (Copyright 2002 by aahz at pobox.com) Hugs and backrubs -- I break Rule 6 http://www.rahul.net/aahz/ Androgynous poly kinky vanilla queer het Pythonista "The more you drive, the less intelligent you are." --_Repo Man_
- Previous message (by thread): calling upper constructor
- Next message (by thread): finding a module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list