General
In General Code
- __annotations__gets a returned dictionary of type annotations for the object
- class.__bases__The tuple of base classes of a class object.
- __builtins__https://newbedev.com/python-what-s-the-difference-between-builtin-and-builtins
- __cached__is the path to any compiled version of the code
- instance.__class__The class to which a class instance belongs.
- R __closure__Noneor a tuple of cells that contain bindings for the function’s free variables.
- __code__The code object representing the compiled function body.
- __defaults__A tuple containing default args values for those args that have defaults, or- None
- object.__dict__The namespace supporting arbitrary function attributes.
- __doc__The function’s documentation string, or None if unavailable; not inherited by subclasses.
- __file__The absolute path to the file that the code currently executing is within
- R __globals__A reference to the dict that holds the function’s global vars
- the global namespace of the module in which the function was defined.
 
- __import__will return the top level module of a package, unless you pass a nonempty- fromlistarg
- __kwdefaults__A dict containing defaults for keyword-only parameters.
- __loader__https://stackoverflow.com/questions/22185888/pythons-loader-what-is-it
- __main__The Entry point to a program, used in- if __name__ == "__main__":
- __module__The name of the module the function was defined in, or None if unavailable.
- __mro__https://docs.python.org/3/library/stdtypes.html#class.__mro__
- __name__The function’s name. same as- __qualname__but not showing the parents
- __package__https://stackoverflow.com/a/21233334/12339658
- __path__https://stackoverflow.com/a/2700924/12339658
- __qualname__A dotted name showing the “path” from the global scope to an item in that module
- __spec__- Nonein- __main__or interactive mode otherwise, information about the module
- class.__subclasses__()Returns a list of weak references to its immediate alive subclasses.