All challenges
Multiple ChoiceHard 30s

Singleton with __new__

Choose the best answer for: singleton pattern
Options
  1. 1Python singletons are a built-in feature needing no code
  2. 2A singleton can only be built with a custom metaclass
  3. 3__new__ can enforce single instance by checking cache
  4. 4A singleton is made by applying @staticmethod to a class

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle