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

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