[Python-ideas] float('∞')=float('inf')
Zaur Shibzukhov
szport at gmail.com
Sat Jul 13 12:29:42 CEST 2013
суббота, 13 июля 2013 г., 10:32:59 UTC+4 пользователь Vernon D. Cole
написал:
>
> This proposal is for only one thing -- to make the following happen:
> >>> inf = '\u221e'
> >>> float(inf)
> inf
> >>>
>
> Exactly. But to be more complete:
>> float(u'∞'),
inf
>> float(u'-∞')
-inf
One could go further and make a string '∞' literal in python to refer to
infinity.
But this can only speak if this proposal makes sense.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130713/7b5e1843/attachment.html>
More information about the Python-ideas
mailing list