Re: __setitem__ without position

Discussion in 'Python' started by Ian Kelly, Oct 11, 2012.

  1. Ian Kelly

    Ian Kelly Guest

    On Thu, Oct 11, 2012 at 4:13 PM, Kevin Anthony
    <> 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.
     
    Ian Kelly, Oct 11, 2012
    #1
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Dave Angel

    Re: __setitem__ without position

    Dave Angel, Oct 11, 2012, in forum: Python
    Replies:
    0
    Views:
    207
    Dave Angel
    Oct 11, 2012
  2. Terry Reedy

    Re: __setitem__ without position

    Terry Reedy, Oct 12, 2012, in forum: Python
    Replies:
    0
    Views:
    183
    Terry Reedy
    Oct 12, 2012
  3. Ethan Furman

    Re: __setitem__ without position

    Ethan Furman, Oct 12, 2012, in forum: Python
    Replies:
    0
    Views:
    156
    Ethan Furman
    Oct 12, 2012
  4. Ethan Furman

    Re: __setitem__ without position

    Ethan Furman, Oct 12, 2012, in forum: Python
    Replies:
    0
    Views:
    115
    Ethan Furman
    Oct 12, 2012
  5. Peter Otten

    Re: __setitem__ without position

    Peter Otten, Oct 12, 2012, in forum: Python
    Replies:
    0
    Views:
    122
    Peter Otten
    Oct 12, 2012
Loading...

Share This Page