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


Groups > comp.lang.python > #50695

Is this a bug?

Date 2013-07-15 08:50 -0700
From Jack Bates <tdhfwh@nottheoilrig.com>
Subject Is this a bug?
Newsgroups comp.lang.python
Message-ID <mailman.4735.1373903859.3114.python-list@python.org> (permalink)

Show all headers | View raw


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

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Is this a bug? Jack Bates <tdhfwh@nottheoilrig.com> - 2013-07-15 08:50 -0700

csiph-web