QuestionQ119

VerifiedObject-Oriented Programming

Which statements are true about Python class constructors?

Choose two
Explanation

A Python class has only one effective initializer method, __init__; redefining it replaces the earlier definition rather than creating an overload. An __init__ method must return None; returning any other value raises a TypeError.

Community Discussion

No comments yet. Be the first to start the discussion!