Skip to content

Files

Latest commit

 

History

History
21 lines (14 loc) · 338 Bytes

class-variable-slots-conflict.md

File metadata and controls

21 lines (14 loc) · 338 Bytes

Pattern: Conflict between class variable and slot name

Issue: -

Description

Used when a value in __slots__ conflicts with a class variable, property or method.

Example of incorrect code:

class Bad(object):
    __slots__ = list

Example of correct code:

class Good(object):
    __slots__ = ()