[Python-3000] What about operator.*slice?

Brett Cannon brett at python.org
Tue Sep 4 20:08:53 CEST 2007


On 9/4/07, Guido van Rossum <guido at python.org> wrote:
> Since x[a:b] is not basic syntax (like it once was) but simply the
> combination of operator.getitem and slice() I don't see the point of
> keeping operator.getitem.
>
> PS. I don't know how useful the operator module really is -- in all
> those years it's existed I haven't really used it myself, and I'm
> always baffled when I see code using it.
>

The only great use I have found for it myself is attrgetter and
itemgetter, but those were added by Raymond in 2.5 (I think).
Otherwise I never use it.

-Brett


More information about the Python-3000 mailing list