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

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