Alessandro Cucci added the comment:

I don't think the problem is about the underscores, since this work...

class Foo:
    def f1(self):
        __obj = object()
        def f2():
            nonlocal __obj
            __obj = []
        f2()
        return isinstance(__obj, list)
        
f = Foo()
print(f.f1())

----------
nosy: +acucci

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue25973>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to