Skip to main content
Journey Uncommon Logo
JourneyUncommon
hardPython__slots__ layoutSingle-choice MCQ

Two of these class definitions behave surprisingly. What actually happens at class-creation time for each?

class A: __slots__ = ('x',) x = 5 class B: __slots__ = 'xy'