[Python-ideas] syntax for set

Rob Cliffe rob.cliffe at btinternet.com
Thu Nov 25 13:21:06 CET 2010


The idea is flawed.  No, really!  People would start writing integer 
literals as floats.  And the scheme doesn't cover floats (there is no 
standard way of writing decimal places in Roman numerals AFAIK).
Rob Cliffe

On 24/11/2010 23:52, average wrote:
> On Wed, Nov 24, 2010 at 5:37 AM, Masklinn <masklinn at masklinn.net 
> <mailto:masklinn at masklinn.net>> wrote:
>
>     On 2010-11-24, at 11:57 , Carl M. Johnson wrote:
>     > On Wed, Nov 24, 2010 at 12:05 AM, Mike Meyer <
>     > mwm-keyword-python.b4bdba at mired.org
>     <mailto:mwm-keyword-python.b4bdba at mired.org>> wrote:
>     >> "Masklinn" <masklinn at masklinn.net
>     <mailto: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.
>
>     But then we're back with the possible confusion between arabic
>     numerals and ascii characters.
>
>     Still, I think this idea is a good one, we need some kind of
>     checksum. Maybe it could be merged with Mike's proposal: the
>     "basic english" number is followed by the same number written
>     using roman numerals and the two versions are checked against one
>     another to ensure consistency.
>
>
> Wow.  We are in the Twilight Zone.  Queue music...
>
> mark
>
>
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> http://mail.python.org/mailman/listinfo/python-ideas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20101125/289aab70/attachment.html>


More information about the Python-ideas mailing list