Metaclasses - magic functions

Mr. Wrobel mr at e-wrobel.pl
Tue Dec 20 16:04:40 EST 2016


Hi,

Quick question, can anybody tell me when to use __init__ instead of 
__new__ in meta programming?

I see that __new__ can be used mostly when I want to manipulate with 
class variables that are stored into dictionary.

But when to use __init__? Any example?

Thanx,
M



More information about the Python-list mailing list