[Edu-sig] poking around in Py3k (recycling old algebra)
kirby urner
kirby.urner at gmail.com
Thu May 28 17:24:32 CEST 2009
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.Daniels at 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.Daniels at Acm.Org
>
> _______________________________________________
> Edu-sig mailing list
> Edu-sig at python.org
> http://mail.python.org/mailman/listinfo/edu-sig
>
More information about the Edu-sig
mailing list