Status of PEP's?
Greg Ewing
greg at cosc.canterbury.ac.nz
Wed Mar 6 21:15:50 EST 2002
James_Althoff at i2.com wrote:
>
> [Andy Gimblett]
> > This just came to me:
> >
> > for index in indices(items):
> > pass
> >
> > or maybe better yet:
> >
> > for index in items.indices():
> > pass
>
> Warning: the latter could get you into trouble with the "methods are
> overrated" crowd <wink>.
It would also preclude doing smart things like
using the __len__ of an object if there wasn't
a more specific method available.
--
Greg Ewing, Computer Science Dept, University of Canterbury,
Christchurch, New Zealand
To get my email address, please visit my web page:
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list