[Python-Dev] Revamping Python's Numeric Model
Sat, 4 Nov 2000 22:32:39 +0100
On Sat, Nov 04, 2000 at 10:56:08AM -0800, Greg Stein wrote:
> Oh, this is just simple:
> 1.2 .isreal()
Very observant, Greg ! I hadn't even realized that, but it makes perfect
sense if you think about it ;) '1.e5' is a single token, to the parser (a
NUMBER), so it can't have whitespace inbetween. But '1 .e5' is naturally
broken up into at least two tokens (three, in this case), and thus is
'correctly' parsed even in todays parser:
>>> 1 .e5
Traceback (most recent call last):
File "<stdin>", line 1, in ?
AttributeError: 'int' object has no attribute 'e5'
Y'all just need to quit thinking about floats as the problem... the problem
is ints, not floats ;)
Thomas Wouters <email@example.com>
Hi! I'm a .signature virus! copy me into your .signature file to help me spread!