On Sun, 28 Nov 2010 21:32:15 -0500 Alexander Belopolsky email@example.com wrote:
On Sun, Nov 28, 2010 at 6:43 PM, Steven D'Aprano firstname.lastname@example.org wrote: ..
is more important than to assure users that once their program accepted some text as a number, they can assume that the text is ASCII.
Seems like a pretty foolish assumption, if you ask me, pretty much akin to assuming that if string.isalpha() returns true that string is ASCII.
It is not to 99.9% of Python users whose code is written for 2.x. Their strings are byte strings and string.isdigit() does imply ASCII even if string.isalpha() does not in many locales.
We are not talking about string.isdigit(), we are talking about the float() constructor when given an unicode string. Constructing a float from an unicode string is certainly a common thing, even in 2.x.