Prepping for the 2027 recruiting cycle? Use code 2027RC for 10% off, valid until July 31st! Oh, and check out our members-only recruitment services.

Logo

Question preview

__new__ vs __init__

What this preview is

About this preview

__new__ vs __init__ is a easy quant interview question on language knowledge in Python.

Unlock full access to getcracked

Join to unlock this question, detailed solutions, and our complete library of quant finance interview prep.

Understanding Python's object construction methods

This is a medium-difficulty Python language question that tests your understanding of the distinction between __new__ and __init__—two critical methods in Python's object lifecycle. Quant shops and trading firms use such questions to confirm that candidates have a solid grasp of low-level Python mechanics, not just surface-level syntax.

The question requires you to reason carefully about when each method is called, what each one returns, which one receives the class vs. the instance, and how they interact in both normal and edge-case scenarios. A correct answer demands clarity on the order of execution, the role of each method in instantiation, and common misconceptions that trip up less careful developers.

  • Object instantiation flow and the role of metaclasses
  • Return values and side effects of __new__ vs __init__
  • Immutable types and singleton patterns
  • Inheritance and cooperative multiple dispatch