Skip to content
Commit 1a7d3c13 authored by Francis Herne's avatar Francis Herne
Browse files

Rewrite declarationForName()

This causes the correct declaration to be found in some unusual cases
 that previously failed.

Only names declared before a function definition, or at module scope,
 were found in its body. Names may be declared later (but before the
 function is called); these were not found.

BUG: 378083
FIXED-IN: 5.2.0

Class attributes from any enclosing class definition were found in
 default arguments, not only those from a method's parent class.

Class or instance attributes were, correctly, not directly visible
 inside a method body (only with `self.` or similar), but hid
 declarations of the same name in outer contexts that should be found.
parent 160b3f07
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment