https://bugs.kde.org/show_bug.cgi?id=378083

Francis Herne <m...@flherne.uk> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |m...@flherne.uk
             Status|UNCONFIRMED                 |CONFIRMED
     Ever confirmed|0                           |1
           Assignee|m...@svenbrauch.de          |m...@flherne.uk

--- Comment #3 from Francis Herne <m...@flherne.uk> ---
In your example, this should work?
---
def test_closures():
    this = 'that'

    def test_inner():
        print(this)

    return test_inner
    # or test_inner()
---

But I think it would be possible to create a case where that isn't an option,
and the original examples are valid code anyway.

Shouldn't be too hard to fix, we need to continue beyond the current line when
searching in parents of a function context.

-- 
You are receiving this mail because:
You are watching all bug changes.

Reply via email to