On Mon, Jul 15, 2013 at 10:50 AM, Jack Bates <tdh...@nottheoilrig.com> wrote: > Hello, > > Is the following code supposed to be an UnboundLocalError? > Currently it assigns the value 'bar' to the attribute baz.foo > > foo = 'bar' > class baz: > foo = foo
No bug. It's not an error because of differences in the way classes and functions compile. -- Zach -- http://mail.python.org/mailman/listinfo/python-list