Peter Otten wrote:

> It's there, just not doctored into the dir() output:
>
>>>> class A(object):
> ...     def __getitem__(self, index): return index
> ...     def __len__(self): return 42
> ...
>>>> iter(A()).__length_hint__
> <built-in method __length_hint__ of iterator object at 0x401d558c>
>>>> iter(A()).__length_hint__()
> 42
>
> Peter

Ah well, actually it's there also in dir(), you just need to use Python 2.5
of course ;)
-- 
Giovanni Bajo


-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to