Python __init__.py
Veröffentlicht 2023-03-16 21:48:31
0
12KB
Python defines two types of packages, regular packages and namespace packages. Regular packages are traditional packages as they existed in Python 3.2 and earlier. A regular package is typically implemented as a directory containing an __init__.py file. When a regular package is imported, this __init__.py file is implicitly executed, and the objects it defines are bound to names in the package’s namespace. The __init__.py file can contain the same Python code that any other module can contain, and Python will add some additional attributes to the module when it is imported.
Suche
Kategorien
- Arts
- Business
- Computers
- Spiele
- Health
- Startseite
- Kids and Teens
- Geld
- News
- Personal Development
- Recreation
- Regional
- Reference
- Science
- Shopping
- Society
- Sports
- Бизнес
- Деньги
- Дом
- Досуг
- Здоровье
- Игры
- Искусство
- Источники информации
- Компьютеры
- Личное развитие
- Наука
- Новости и СМИ
- Общество
- Покупки
- Спорт
- Страны и регионы
- World
Mehr lesen
What Should a Presentation Include?
A well-structured presentation isn’t just about attractive slides — it’s about...
What Is the Personal Life Story of Famous Advertisers?
Advertising history is often told through campaigns, agencies, and awards, but behind every...
Autism Spectrum: Repetitive Behaviours
ASD includes a wide variety of characteristics. Some of these include behavioral characteristics...
Is There a Market for My Product or Service?
Before launching any business, one of the most important questions to ask is whether there is a...
What Are the Different Types of Mortgage Interest Rates (Fixed vs. Variable) and How Do They Work?
What Are the Different Types of Mortgage Interest Rates (Fixed vs. Variable) and How Do They...