[Python] There seems to be something called __dict__

class A:
    def __init__(self):
        self.a = 'aa'
        self.b = 'bb'

a = A()
a.__dict__
-> {'a': 'aa', 'b': 'bb'}

Recommended Posts

[Python] There seems to be something called __dict__
Python 3.9 dict merge (`|`) seems to be useful
[Road to Intermediate] Python seems to be all objects
Processing of python3 that seems to be usable in paiza
I tried to implement what seems to be a Windows snipping tool in Python
Python has come to be recognized so far.
Updated to Python 2.7.9
Python Dict category
Starting with Python 3.10, the form returned by inspect.signature () seems to be based on typing.get_type_hints ().
"Backport" to python 2
[Python] tkinter Code that is likely to be reused
[Python] How to sort dict in list and instance in list
[Python] pandas Code that is likely to be reused
Only size-1 arrays can be converted to Python scalars
Convert Webpay Entity type to Dict type (recursively in Python)
Something to enjoy with Prim Pro (X-Play) and Python
I want to do something in Python when I finish
What seems to be a template of the standard input part of the competition pro in python3