[Python-Dev] str with base (original) (raw)
skip at pobox.com skip at pobox.com
Tue Jan 17 16:38:42 CET 2006
- Previous message: [Python-Dev] str with base
- Next message: [Python-Dev] str with base
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Alex> Identically the same situation as for int: the base argument is
Alex> only accepted if the first argument is a str (not a float, etc).
Alex> Just the same way, the base argument to str will only be accepted
Alex> if the first argument is an int (not a float, etc).
>>
Skip> A shortcoming in int() hardly seems like a good reason to mess
Skip> with str().
Gareth> How's it a shortcoming in int() that it doesn't do anything
Gareth> with, say, int(2.345,19)?
My reasoning was that just because int() was written to ignore the second arg depending on type (the "shortcoming") doesn't mean that str() should as well.
Skip
- Previous message: [Python-Dev] str with base
- Next message: [Python-Dev] str with base
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]