[Edu-sig] poking around in Py3k (recycling old algebra)
Scott David Daniels
Scott.Daniels at Acm.Org
Thu May 28 17:27:30 CEST 2009
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
More information about the Edu-sig
mailing list