Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #31165 > unrolled thread

Re: __setitem__ without position

Started byEthan Furman <ethan@stoneleaf.us>
First post2012-10-12 09:16 -0700
Last post2012-10-12 09:16 -0700
Articles 1 — 1 participant

Back to article view | Back to comp.lang.python

This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by below is the oldest one visible, not the original post.


Contents

  Re: __setitem__ without position Ethan Furman <ethan@stoneleaf.us> - 2012-10-12 09:16 -0700

#31165 — Re: __setitem__ without position

FromEthan Furman <ethan@stoneleaf.us>
Date2012-10-12 09:16 -0700
SubjectRe: __setitem__ without position
Message-ID<mailman.2091.1350058892.27098.python-list@python.org>
Terry Reedy wrote:
> In 3.x, you would write __setitem__ to recognize that the 'key' is a 
> slice object rather than an int and act accordingly. (In 2.x, you would 
> write __setslice__.) 

I'm not sure how far back it goes, but at least from 2.4 forward 
__setitem__ works with slices just fine.

~Ethan~

[toc] | [standalone]


Back to top | Article view | comp.lang.python


csiph-web