Skip to content

Regression since v0.520 due to PR #3700: Name 'blah' not defined #3713

Closed
@gvanrossum

Description

@gvanrossum

Example:

class A(object):
    def f(self):
        self.attr = 1
    attr = 0  # error: Name 'attr' is not defined

class B(object):
    attr = 0  # no error
    def f(self):
        self.attr = 1

This has no errors in v0.520 but has an error at the indicated line at f127e2c, i.e. it is caused by #3700.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions