On 2/22/07, Neal Becker <[EMAIL PROTECTED]> wrote: > Well consider this: > >>>str (4) > '4' > >>>int(str (4)) > 4 > >>>str (False) > 'False' > > >>>bool(str(False)) > True > > Doesn't this seem a bit inconsisent?
Virtually no python objects accept a stringified version of themselves in their constructor: >>> str({}) '{}' >>> dict('{}') Traceback (most recent call last): File "<stdin>", line 1, in <module> ValueError: dictionary update sequence element #0 has length 1; 2 is required >>> str([]) '[]' >>> list('[]') ['[', ']'] Python is not Perl. -Mike _______________________________________________ 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