On Sun, 28 Nov 2010 21:32:15 -0500 Alexander Belopolsky <alexander.belopol...@gmail.com> wrote: > On Sun, Nov 28, 2010 at 6:43 PM, Steven D'Aprano <st...@pearwood.info> 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. Regards Antoine. _______________________________________________ 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