Last active
December 11, 2021 07:50
-
-
Save p-geon/67085bb6025c7903f49d91baa5c9ebbf to your computer and use it in GitHub Desktop.
This file contains 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
class AllVariablesNamePrinter: | |
def __init__(self): | |
self.a = 10 | |
self.b = { | |
"ba": 1, | |
"bb": 2, | |
} | |
self.c = 20 | |
def __call__(self): | |
print('> start') | |
[(print(x) if(x!=None) else None) for x in [(attr if(attr.startswith('__')==False) else None) for attr in dir(self)]] | |
print('> end') | |
if(__name__=='__main__'): | |
AllVariablesNamePrinter()() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks himako-san.