Level 9 : What is the purpose of the __repr__ method in Python?

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