KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
The documentation implies that it's ok for __new__(cls, ...) to return an object of a type different than cls . It says in that case __init__() won't be called. It's not stated explicitly, but common sense or a simple test confirms that the resulting the object won't have type cls . Why is this seemingly strange behavior allowed? What's the use case? It's clearly intentional.
Tags (comma-separated)
Save Edits
Cancel