This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jennydaman
Recipients jennydaman
Date 2021-03-03.00:36:27
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1614731789.13.0.0370276321832.issue43380@roundup.psfhosted.org>
In-reply-to
Content
# 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
```
History
Date User Action Args
2021-03-03 00:36:29jennydamansetrecipients: + jennydaman
2021-03-03 00:36:29jennydamansetmessageid: <1614731789.13.0.0370276321832.issue43380@roundup.psfhosted.org>
2021-03-03 00:36:28jennydamanlinkissue43380 messages
2021-03-03 00:36:27jennydamancreate