Level 1 : What is the purpose of the __init_subclass__ method in Python?

Author: IndraD | Tags: __init_subclass__ | 1859+ Python FAQs | Share
int | class-and-object | conditional-statements | list-operation | compute | conversion | goto-function | id-function | constructor | format | built-in | list | identity-operator | control-flow | indexing | input | data-structures | enumerate() | assignment-operator | data-type | lambda-functions | append | decimal | else-statement | built-in-function | class-decorators | introduction-to-multiprocessing | boolean-and-non-boolean | escape-operator | bitwise-operator | immutable-data-type | operator-and | inherit | threading | factorial-function | thread | introduction-to-threads | gil | generators | while-and-for-loop | __all__-attribute | type_conversion | walking-through-directories-using-os.walk() | print-statement | introduction-to-python | heap-memory | using-assertions-(assertequal,-assertraises) | print | objects | unit-testing | tuple | data-type | list-comprehensions | classes | formatting-with-strftime | zip-function | global-keyword | datetime.date,-datetime.time,-datetime.datetime | arithmetic-expression | counter-function | oop | list-comprehension | comprehension | arbitrary-arguments-(*args,-**kwargs) | head-and-tail | data_structure | floats | writing:-write(),-writelines() | reading:-read(),-readline(),-readlines() | operator-or | class-and-inheritance | recursion | keyword | copy | random-function | dictionary-methods | intering | identifier | default-mutable-argument | lambda-function | working-with-file-paths | logical-operator | string-formatting | library | namedtuple | import-method | tuple-methods | slice | loops | context-manager | string | data-structures-in-python | benefit | assert | syntax-error | basic | while-else-loop | managing-directories-with-os-and-shutil | precedence | name-mangling | membership-operators-(in,-not-in) | choice | identity-operators-(is,-is-not) | python | using-else-and-finally | exponentiation | type-conversion | invalid-list | joining-and-merging-dataframes | min-max-function | global-variable | formal-and-actual-parameter | max-min | using-the-threading-module | update | magic-method | lambdas | python-module | boolean-masking | using-join()-and-is_alive()-methods | single-inheritance | type-conversion-and-casting | integers | assignment-operators | sum() | scientific-notation | recurssion | exception-handling | opening-files-(open()) | matrix | else | time-series-with-pandas | string-formatting | datatype | booleans | aggregating-data-with-functools.reduce() | creating-custom-modules | multiple-inheritance | asyncio-module | implementation | touples | array | access-modifier | using-os-and-pathlib-modules | indexing:-loc-vs-iloc | identity-operator | frozenset | string-iteration | binary | input-function | init | iterators | boolean | tuple-unpacking | memory-management | functional-programming | string-methods | parsing-with-strptime | list-join | error-handling | __future__ | anchors-(^,-$) | error | built-in-function | virtual-environment | tuples | datetime | built-in-modules | generator | yield | arithmetic-operation | version | conditional-statement | operators | file-handling | asyncio | deep-copy | regular-expression | comment | mathematical-function | list-slicing | design-principle | immutability | __init_subclass__ | logical-operators | encoding | complex | multiple-except-blocks | pickling--unpickling | return-statement | operand | sorting | sys-module | software-design | oops | statement | module | multiprocessing | mutable | thread-safe-data-structures-(queue.queue) | rollback | split | mapping-function | lists | list-mutation | turtle | sorted | python-operators | variable | namespace | multithreading | python-django | dicts | interpreter | advanced-file-operations | decorator | using-map()-for-transformations | collection | data-types | working-with-dates-and-times | round | expand-tab | working-with-temporary-files-using-tempfile | command-line-parsing | using-yield-in-functions | reading-and-writing-files | list,-set,-and-dictionary-comprehensions | operator | function | python_version | literal-characters-and-special-characters | complex-number | mathematics | precedence-and-associativity | pass | debugging | math-copysign | binary-operation | postfix | sets | join | string-manipulation | while-loops | function-argument | expression | bitwise-operator | global-variable | sorting-and-ranking | installation | list-indexing | slicing | creating-and-starting-threads | inheritance | pandas | pseudocode | operations | lambda | loop | string-concatenation | logical-operation | dictionary-comprehensions | iterable | indentation | numpy | nested-loop | counter | input-function | dataframe-and-series-objects | conditional-statement | collections | integer | typeerror | center | control-statement | test-discovery | bitwise | handling-missing-values-(fillna,-dropna) | encapsulation | memory | difference-between-threads-and-processes | def | odd-number | match | class | floating-point-precision | iterator | overflow | with-statement | range | higher-order-function | methods | regex | for | list-vs-tuple | error-handling | string-method | mysql | syntax-error | operator-overloading | sum-function | feature | while-loop | round-function | string-slicing | working-with-binary-files-(rb,-wb) | key-value-pairs | comparison | destructor | using-lists-as-stacks | exception-handling | attribute | parameter | application | overriding-methods | python-syntax-and-structure | matplotlib | filter | strings | numeric | functional-programming | list-methods-and-slicing | exception | why-use-multiprocessing-over-threading?-(gil) | multiple-inheritance | filter-function | control-flow | data-structure | min-function | syntax | logical-operator | set | python-repl | python-history | fabs-function | stack | thread-synchronization | raise | docstring | global | reading-and-writing-large-files-efficiently | method-overloading | call | zip | syntaxerror | generators-in-python | loop-control | file | class-and-instance-variable | shallow-copy | version-check | swapping | staticmethod | type-conversion | raise-statement | functions | object-attribute | file-handling | descriptors | method | pep | quantifiers-(*,-+,-?,-{}) | file_handling | string-slicing | regular-expressions | loop-control-statements | dictionaries | dictionary | polymorphism | default-arguments | condition | list-method | defining-functions | math | data-type-conversions | static-method | matrix-list-comprehension | data-structure | virtual-environment | sys | zfill-function | async | filtering-and-indexing | directory-operations | map-function | function-and-scope | list-comprehension | random | set-operation | package-management | string-method ...