Asked • 06/25/19

What is __init__.py for?

What is `__init__.py` for in a Python source directory?

1 Expert Answer

By:

Megham G. answered • 07/07/19

Tutor
New to Wyzant

Do it the most awesome way possible.

William M.

tutor
good explanation of OO programming in Python recommend using the keyword arguments when calling the constructors, following on from your example... maruthi_suzuki = Car(model="ertiga", color="black", company="suzuki", speed_limit=60) audi = Car(speed_limit=80, color="red", company="audi", model="A6") # Note: doing this makes it clear what is being set when there are multiple fields, and allows you to put the keyword arguments in any order
Report

12/14/19

Still looking for help? Get the right answer, fast.

Ask a question for free

Get a free answer to a quick problem.
Most questions answered within 4 hours.

OR

Find an Online Tutor Now

Choose an expert and meet online. No packages or subscriptions, pay only for the time you need.