[Python-ideas] syntax for set

Carl M. Johnson cmjohnson.mailinglist at gmail.com
Wed Nov 24 11:57:57 CET 2010


On Wed, Nov 24, 2010 at 12:05 AM, Mike Meyer <
mwm-keyword-python.b4bdba at mired.org> wrote:

> "Masklinn" <masklinn at masklinn.net> wrote:
>
> >As an alternative, I would modestly propose banning integer literals
> >altogether in favor of english-spelled constants: `ONE` can hardly be
> >confused with the letter `l`, and having to write `FIVE HUNDRED
> >FORTY-ONE BILLION FOUR HUNDRED FIFTY ONE MILLION NINE HUNDRED EIGHTY
> >ONE THOUSAND NINE HUNDRED TWENTY ONE` rather than 514451981921 would
> >surely reduce the usage of redundant magic numbers in the code.
>

+1 If it's good enough for my banker when writing checks, it should be good
enough for Python. But it might be safer if we required the Arabic numerals
in parentheses following the English. If the two don't match, we could raise
a CheckingError. Seems to be a basically self-documenting error type to me.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20101124/31b22833/attachment.html>


More information about the Python-ideas mailing list