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


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

Re: __setitem__ without position

Started byIan Kelly <ian.g.kelly@gmail.com>
First post2012-10-11 16:43 -0600
Last post2012-10-11 16:43 -0600
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 Ian Kelly <ian.g.kelly@gmail.com> - 2012-10-11 16:43 -0600

#31137 — Re: __setitem__ without position

FromIan Kelly <ian.g.kelly@gmail.com>
Date2012-10-11 16:43 -0600
SubjectRe: __setitem__ without position
Message-ID<mailman.2071.1349995434.27098.python-list@python.org>
On Thu, Oct 11, 2012 at 4:13 PM, Kevin Anthony
<kevin.s.anthony@gmail.com> wrote:
> I'm not supprised... and understand why it's happening.  I'm asking how to
> get around it.
>
> Basically i'm asking how to override, if i can, the `=`

You cannot override assignment of local variables.  To get around it,
use slicing as Dave suggested, or use an attribute instead of a local
variable.

[toc] | [standalone]


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


csiph-web