What is the purpose of __init__ in Python?
Reveal the answer and explore the explanation.
03EasyCoreWhat is the purpose of __init__ in Python?
Answer
EasyCore
What is the purpose of __init__ in Python?
Answer
It initializes an already-created instance. Object creation is handled by __new__.
Practical example
Store model configuration when creating an inference service.
Reference: Further reading ↗