Neal Becker writes: > Well consider this: > >>>str (4) > '4' > >>>int(str (4)) > 4 > >>>str (False) > 'False' > > >>>bool(str(False)) > True > > Doesn't this seem a bit inconsisent?
The former case is a *conversion* from an expression that *does not* have an interpretation in a numerical context to an integer. The latter case is a *canonicalization* from an expression that *does* have an interpretation in a boolean context to the equivalent boolean constant. I don't have a problem with that. YMMV. _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com