Movatterモバイル変換
[0]ホーム
[Python-Dev] string.ato? and Unicode
Mark Hammondmhammond@skippinet.com.au
Sun, 2 Apr 2000 09:53:50 +1000
Is this an over-sight, or by design?>>> string.atoi(u"1")...TypeError: argument 1: expected string, unicode foundIt appears easy to support Unicode - there is already an explicitStringType check in these functions, and it simply delegates toint(), which already _does_ work for UnicodeA patch would leave the following behaviour:>>> string.atio(u"1")1>>> string.atio(u"1", 16)...TypeError: can't convert non-string with explicit baseIMO, this is better than what we have now. I'll put together apatch if one is wanted...Mark.
[8]ページ先頭