jennydaman <jdmzh+pyt...@protonmail.com> added the comment:
# Example Consider these three examples, which are theoretically identical ``` a = 4 class A: a = a print(A.a) def createB(b): class B: z = b print(B.z) createB(5) def createD(d): class D: d = d print(D.d) createD(6) ``` ## Expected Output ``` 4 5 6 ``` ## Actual Output ``` 4 5 Traceback (most recent call last): File "<stdin>", line 1, in <module> File "<stdin>", line 2, in createD File "<stdin>", line 3, in D NameError: name 'd' is not defined ``` ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue43380> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com