while true: !!!

Darren New dnew at san.rr.com
Mon Dec 18 12:41:40 EST 2000


> > 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).

I think that's because there's generally one way to succeed and many ways to
fail.

> Few languages equate 'success' (not raising an exception, for
> languages where 'exception' means something) with 'a boolean
> result' (Icon is rather oriented that way, but that's because
> it _backtracks_ over 'insuccess' -- a very different setup
> than Python's). 

Actually, it's not *quite* like that. "if" in Icon is true for *any* result.
It's only the "no result" that invokes the else part. A failure/exception in
Icon is more like partial functions in math, where it's possible there are
inputs which generate no results at all.  One of the cleaner ways of
handling it I've seen.

-- 
Darren New / Senior MTS & Free Radical / Invisible Worlds Inc.
San Diego, CA, USA (PST).  Cryptokeys on demand.
Personal malapropism generator free with purchase!
Steganography: The manual is hidden in the source code.
Gold mining is only profitable because of the gold found.



More information about the Python-list mailing list