[Python-3000] The repr() of Ellipsis?

Thomas Wouters thomas at python.org
Tue Mar 6 14:55:01 CET 2007


On 3/6/07, Georg Brandl <g.brandl at gmx.net> wrote:
>
> Patch http://python.org/sf/1673355 changes Ellipsis' repr() to '...'.
> While
> this is consistent, the submitter himself noted that it would probably
> cause
> problems with doctest.
>
> Additionally, '...' is currently used to denote recursive structures in
> the
> repr of lists and dicts, so this would have to be changed too.
>
> What do you think?


I believe it is not worth changing Elipsis' repr. In fact, the problems with
... may indicate that we shouldn't allow '...' everywere after all... But I
expect it isn't really a problem (It would be a syntax error when used like
in doctests, and in the case of eval()'ing the repr of a dict/list it would
otherwise raise a syntax error. The traditional meaning of elipsis is
actually correct, there, although it's not how Python programmers are used
to dealing with it.)

-- 
Thomas Wouters <thomas at python.org>

Hi! I'm a .signature virus! copy me into your .signature file to help me
spread!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.python.org/pipermail/python-3000/attachments/20070306/2f333bc7/attachment.htm 


More information about the Python-3000 mailing list