Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #31167 > unrolled thread
| Started by | Peter Otten <__peter__@web.de> |
|---|---|
| First post | 2012-10-12 18:42 +0200 |
| Last post | 2012-10-12 18:42 +0200 |
| 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.
Re: __setitem__ without position Peter Otten <__peter__@web.de> - 2012-10-12 18:42 +0200
| From | Peter Otten <__peter__@web.de> |
|---|---|
| Date | 2012-10-12 18:42 +0200 |
| Subject | Re: __setitem__ without position |
| Message-ID | <mailman.2093.1350060139.27098.python-list@python.org> |
Ethan Furman wrote: > 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. The __...slice__() methods are deprecated since 2.0. http://docs.python.org/release/2.0/ref/sequence-methods.html
Back to top | Article view | comp.lang.python
csiph-web