[Python-Dev] str with base (original) (raw)
Fredrik Lundh fredrik at pythonware.com
Tue Jan 17 17:27:38 CET 2006
- Previous message: [Python-Dev] str with base
- Next message: [Python-Dev] str with base
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
skip at pobox.com wrote:
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.
"ignore" is perhaps the wrong word:
int(1.0, 1) Traceback (most recent call last): File "", line 1, in ? TypeError: int() can't convert non-string with explicit base
- Previous message: [Python-Dev] str with base
- Next message: [Python-Dev] str with base
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]