«

»

Jul
21

__new__ vs. __init__

While running around debugging some timeouts with a coworker we came across __new__. Of course we were then curious as to what __new__ was and how it was different than __init__.  There was a good explanation on StackOverflow.  Although I understand it now, I’m not sure when I would need to subclass an immutable type.  Anyone?

Leave a Reply

Your email address will not be published.

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>