PEP239 (Rational Numbers) Reference Implementation and new issues
Jeff Epler
jepler at unpythonic.net
Thu Oct 3 11:47:43 EDT 2002
On Thu, Oct 03, 2002 at 06:34:27AM +0000, Alex Martelli wrote:
> No, it wouldn't hurt much (though I'd spell it with a lowercase r -- I
> think that would make it more readable). A trailing d could specify
> decimal, a trailing L (normally uppercase for legibility) long -- the
> latter should be extended to literals such as:
> 1e7L
> meaning the same as 10000000L
Would '1.1e7L' also be a long literal under this suggestion?
you could always pollute your namespace with variables of the form 'e%d'
and type '1L*e7' ...
and then there's ways
setlocale(LC_ALL, "en_GB") # surprise the americans
parse_long("ten billion")
Jeff
More information about the Python-list
mailing list