This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# None is of type NoneType | |
print(f"{None} is of type", type(None)) | |
# Each object contains a reference to its class, | |
# let's use this to create a new instance of NoneType | |
NewNone = None.__class__() | |
# NoneType is a *singleton*, so should be equal | |
assert NewNone is None |
OlderNewer