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

--- Comment #2 from Diego Garcia <dnico...@gmail.com> ---
The problem is that when you want to call the inner function or return it, it
will also get flagged as an error. And it would be correct since this code
fails.

---
def test_closures():
    this = 'that'

    return test_inner
    # or test_inner()

    def test_inner():
        print(this)
---

The first snippet is the (AFAIK) only way to do closures or nested functions in
Python.

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

Reply via email to