stupid simple scope issue

Chris Angelico rosuav at gmail.com
Sun Aug 4 16:03:22 EDT 2013


On Sun, Aug 4, 2013 at 8:21 PM, JohnD <john at nowhere.com> wrote:
> On 2013-08-04, Chris Angelico <rosuav at gmail.com> wrote:
> [...]
> Thank you very much. The dust is slowly starting to move.
> The code posted is nothing like the real thing, but I tried
> to capture the essence.
>
> From your commants I think I see my mistake.
>
> Thank you very much for your reply!

No probs!

Python does have a slightly odd (compared to other languages)
interpretation of "variable assignments" (name bindings, really)
inside a class block. Trips up a lot of people.

ChrisA



More information about the Python-list mailing list