while true: !!!
Moshe Zadka
moshez at zadka.site.co.il
Mon Dec 18 22:54:23 EST 2000
On Mon, 18 Dec 2000 08:52:29 -0500, D-Man <dsh8290 at rit.edu> wrote:
> Thus while true: is equal to while 1: except that a boolean, not an
> integer is used for the test. I, for one, would like to abolish the
> concept that an integer can denote true or false. How many functions
> return 0 for success? (just take a look at the standard C library).
Luckily, Python functions denote failure by exceptions, and success
is implicit. Returning a number (1/0) as a boolean is an accepted practice,
and is usually followed in the Python library. Exceptions are things
like os.system, which are thin wrappers to C calls.
--
Moshe Zadka <sig at zadka.site.co.il>
This is a signature anti-virus.
Please stop the spread of signature viruses!
More information about the Python-list
mailing list