?Why is 0e-6 invalid?
tim.one at home.com
Thu Dec 21 19:03:50 EST 2000
> Why is 0e-6 invalid and 0*.000001 is valid?
The syntax of Python's floating-point literals is defined in the Language
Reference manual, here:
Some of the grammar productions referenced there are defined on earlier
pages. As you can read there, the syntax Python allows for floats tries to
avoid confusion between prefixes of floats and octal integer literals. So
is not allowed, and neither is
are allowed, though.
Continuing to ask "why?" beyond that is likely to be an unsatisfying hobby
More information about the Python-list