On Mon, Jul 15, 2013 at 10:50 AM, Jack Bates <tdhfwh at 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