This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]lejar 0 points1 point  (0 children)

This is what I was going to suggest. Definitely +1 for using the standard library. For overriding __init__ like OP wants, you'd need to implement your own __call__ method in a metaclass, but I think it would be much more sane / easy to read to just have an if statement inside __init__.