On 4 June 2018 at 09:44, Pål Grønås Drange <paal.dra...@gmail.com> wrote:
>> Speaking for myself, not for Paul, I guess my big objection would be
>> that there would be too many collisions with other interpretations.
>> Eg, does "5m" mean "5 minutes", "5 meters", or "the number 0.005"?  Or
>> perhaps "5 minutes of arc"?
>
> Just to clarify, the proposition was actually `5min`, and that it would
> mean `datetime.timedelta(minutes=5)`.

... and the fact that it's easy to forget that it's 5min rather than
5m (is it 1h or 1hr, 2s or 2sec?) is a problem with the proposal. Of
course there's a similar problem with timedelta(minutes=5) or
timedelta(minute=5) (timedelta uses minutes, datetime uses minute, I
had to look in the docs to check), so it's not unique to the literal
notation, but it is an issue nevertheless.

Paul
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to