haiyang kang wrote:
hi,
I agree with this.
I never seen any man in China using chinese number literals (at
least two kinds:一, 壹, same meaning with 1)
in Python program, except UI output.
They can do some mappings when want to output these non-ascii numbers.
Example: if 1: print "一"
I think it is a little ugly to have code like this: num =
float("一.一"), expected result is: num = 1.1
I don't expect that anyone would sensibly write code like that, except
for testing. You wouldn't write num = float("1.1") instead of just
num = 1.1 either.
But you should be able to write:
text = input("Enter a number using your preferred digits: ")
num = float(text)
without caring whether the user enters 一.一 or 1.1 or something else.
--
Steven
_______________________________________________
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