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

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