0

I have seen the use of __new__ in several answers across the site, especially in things like:

super().__new__(*args)

Whereas I use:

super().__init__(*args)
  • Is it similar to __init__?
  • Is it even a method?
  • Which should a beginner use?
Mutantoe
  • 703
  • 8
  • 20
  • in short, `__new__` is a constructor where as `__init__` is an initializer (works on an existing objects, that's why you already have `self`). See @Lix 's suggestion. – Reut Sharabani May 03 '15 at 08:47
  • @Lix Thanks! That clears it up. – Mutantoe May 03 '15 at 09:07
  • @Mutantoe - no problem :) Happy to help! Once you have enough rep points, go ahead and give an upvote to the user who provided the actual answer - this is the best way of showing your appreciation on [so]. – Lix May 03 '15 at 09:09

0 Answers0