[Python-ideas] Allow attribute references for decimalinteger

Chris Angelico rosuav at gmail.com
Thu Oct 31 16:00:13 CET 2013


On Fri, Nov 1, 2013 at 1:35 AM, Philipp A. <flying-sheep at web.de> wrote:
> 2013/10/31 Greg Ewing <greg.ewing at canterbury.ac.nz>
>>
>> In hindsight, things might have been better if the decimal point
>> were required to have at least one digit after it, but it's
>> probably too late to change that now.
>
>
> i disagree. i like writing “1.” for “float(1)” and “.1” for “1/10”. what’s
> the point of redundant zeros?

".1" is not under challenge (the requirement suggested is merely a
digit after, nothing about before). I agree that "1." for 1.0 is a
useful shorthand, but if the parser had originally been written to
disallow it, I doubt there'd be very strong call to make it more free.

ChrisA


More information about the Python-ideas mailing list