Level 10 : What is the purpose of the __slots__ attribute in a Python class?

Author: IndraD | Tags: class | 1736+ Python FAQs | Share
list-operation | methods | error-handling | operator | inherit | oop | join | range | sorting | tuple | class-and-instance-variable | choice | boolean | data-type | mapping-function | functions | string | complex | recursion | list-join | matrix-list-comprehension | regex | conditional-statement | sys-module | round | boolean-and-non-boolean | mathematics | interpreter | counter | gil | python-module | binary-operation | print-statement | polymorphism | threading | __all__-attribute | comparison | complex-number | deep-copy | def | python | function-and-scope | floating-point-precision | file-handling | name-mangling | input-function | __future__ | class-and-object | decorator | design-principle | odd-number | bitwise-operator | math-copysign | dictionaries | namedtuple | destructor | __init_subclass__ | matrix | while-and-for-loop | class-and-inheritance | round-function | min-max-function | list-indexing | python-history | magic-method | condition | for | yield | thread | regular-expression | control-flow | max-min | string-formatting | installation | raise | conversion | generators-in-python | sum() | multiple-inheritance | object-attribute | higher-order-function | application | comprehension | indexing | import-method | enumerate() | frozenset | python_version | slicing | iterable | string-slicing | basic | virtual-environment | rollback | slice | string-slicing | generator | file | syntax-error | bitwise | global | sorted | feature | variable | benefit | random | lambdas | mutable | typeerror | syntax | attribute | lambda-function | with-statement | swapping | init | collections | logical-operator | version-check | compute | lambda | while-loop | mathematical-function | control-flow | debugging | type_conversion | pandas | center | async | string-concatenation | asyncio | inheritance | static-method | exception-handling | operator-overloading | else-statement | string-manipulation | input-function | encapsulation | array | list | global-variable | package-management | loop-control | data-type | generators | goto-function | oops | functional-programming | zfill-function | invalid-list | type-conversion | function-argument | exponentiation | error | expression | print | iterator | immutable-data-type | exception | statement | global-variable | conditional-statement | decimal | zip | data_structure | pep | staticmethod | implementation | syntaxerror | fabs-function | command-line-parsing | operator-or | precedence-and-associativity | factorial-function | asyncio-module | identity-operator | multithreading | module | pickling-&-unpickling | descriptors | string-formatting | docstring | operations | random-function | global-keyword | data-structures | version | exception-handling | pseudocode | set | overflow | software-design | arithmetic-expression | collection | library | operators | format | expand-tab | stack | namespace | assert | recurssion | numeric | filter | call | copy | immutability | type-conversion | list-comprehension | control-statement | int | arithmetic-operation | lists | dictionary | objects | list-slicing | constructor | precedence | nested-loop | touples | keyword | operator-and | escape-operator | default-mutable-argument | string-iteration | python-repl | logical-operation | binary | shallow-copy | split | file_handling | scientific-notation | input | datetime | multiprocessing | turtle | built-in-function | built-in-function | data-structure | counter-function | parameter | file-handling | classes | method | sys | set-operation | memory | list-comprehension | return-statement | built-in | list-mutation | memory-management | encoding | tuple-unpacking | python-django | string-method | update | context-manager | dicts | indentation | list-vs-tuple | while-else-loop | sum-function | zip-function | access-modifier | identity-operator | operand | list-method | append | bitwise-operator | head-and-tail | function | postfix | map-function | filter-function | class | integer | id-function | matplotlib | loop | virtual-environment | heap-memory | string-method | assignment-operator | match | comment | mysql | min-function | datatype | formal-and-actual-parameter | identifier | numpy | loops | math | logical-operator | data-structure | syntax-error ...