__package__
Dunder AttributePython 2.0+Advanced
The name of the package a module belongs to
Quick Info
- Documentation
- Official Docs
- Python Version
- 2.0+
Learn by Difficulty
Quick Example
python
# __package__ print("Demonstrating __package__") print(type(object).__dict__.keys())
__package__ is a special attribute that the name of the package a module belongs to.
Try in PlaygroundTags
oopintrospectioncore