Python style guidelines

Greg Ewing (using news.cis.dfn.de) wmwd2zz02 at sneakemail.com
Thu Mar 11 22:23:37 EST 2004


John Roth wrote:
> I suspect that's a rather common error. I'd much prefer
> that both find and index return an object that acted like
> a number but returned the logically correct response when
> queried as a boolean: true for zero and false for -1.

Good heavens, no! That would be a *massively* dangerous
object to have floating around in one's program...

-- 
Greg Ewing, Computer Science Dept,
University of Canterbury,	
Christchurch, New Zealand
http://www.cosc.canterbury.ac.nz/~greg




More information about the Python-list mailing list