Hey, didn't know that!

And that *is* a Funny class you made there, quite twisted thx!

Kirby


On Thu, May 28, 2009 at 8:27 AM, Scott David
Daniels<scott.dani...@acm.org> wrote:
> kirby urner wrote:
>>
>> ... Hey, did you know Ellipsis is a new primitive object in Python 3,
>> denoted ... ?
>>
>>>>> ...
>>
>> Ellipsis
>
> Actually, it has been around for quite a while.  Try this in even a much
> older Python:
>
>    >>> class Funny(object):
>            def __getitem__(self, *args):
>                return args
>    >>> Funny[1, ..., 10]
>    (1, Ellipsis, 3)
>    >>> Ellipsis
>    Ellipsis
>
> --Scott David Daniels
> scott.dani...@acm.org
>
> _______________________________________________
> Edu-sig mailing list
> Edu-sig@python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>
_______________________________________________
Edu-sig mailing list
Edu-sig@python.org
http://mail.python.org/mailman/listinfo/edu-sig

Reply via email to