bool v. int distinctions
Lee Harr
missive at frontiernet.net
Mon Oct 13 10:57:25 EDT 2003
More information about the Python-list mailing list
Mon Oct 13 10:57:25 EDT 2003
- Previous message (by thread): bool v. int distinctions
- Next message (by thread): checking for the existence of an attribute
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
>>> I am wondering if this is a reasonable thing to do: > [...] >>> Won't work with 2.1, clearly, but it seems ok in a >>> recent 2.2 or in 2.3. >> What makes you think it won't work in 2.1? >> python2.1 > Python 2.1.3 (#1, Apr 19 2003, 09:07:31) > [GCC 2.95.4 20020320 [FreeBSD]] on freebsd4 > Type "copyright", "credits" or "license" for more information. > >>> True > Traceback (most recent call last): > File "<stdin>", line 1, in ? > NameError: name 'True' is not defined > >>> True = 1 >Try > > >>> True = 1==1 > >to get a boolean true instead of an integer true :-) > Oh, nice. Not that I use 2.1 for anything except Zope anymore... but still very interesting. Thanks.
- Previous message (by thread): bool v. int distinctions
- Next message (by thread): checking for the existence of an attribute
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list