Level 10 : What is the purpose of the __call__ method in a Python class?

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