About 11,900 results
Open links in new tab
  1. Python repr() Function - GeeksforGeeks

    Jul 23, 2025 · The repr () function in Python is used to return a string representation of an object that can be used to recreate the …

  2. Python __repr__ () Method - W3Schools

    While __str__() controls the readable, user-facing text shown when you print an object, __repr__() controls a more technical …

  3. Python __repr__ () magic method - GeeksforGeeks

    Jul 23, 2025 · Python __repr__ () method Example In this example, we define a GFG class with three instance variables f_name, …

  4. python - What is the purpose of the __repr__ method? - Stack Overflow

    Implement repr for every class you implement. There shouldn't be any excuse. Implement str for classes for which you think …

  5. repr () | Python’s Built-in Functions – Real Python

    Reference Python’s Built-in Functions / repr () The built-in repr () function provides a developer-friendly string representation of an …

  6. reprlib — Alternate repr () implementation — Python 3.15.1 …

    2 days ago · The reprlib module provides a means for producing object representations with limits on the size of the resulting strings. …

  7. python - What does !r do in str () and repr ()? - Stack Overflow

    Feb 7, 2012 · In python, there are two fairly natural choices to get a string representation of something ... str and repr. str is generally …

  8. Python Repr () with Examples - Python Geeks

    Python repr() returns a string that holds a printable representation of an object. Learn more about this function and repr() vs str().

  9. Python repr () - Programiz

    The repr () function returns a printable representation of the given object. In this tutorial, we will learn about Python repr () in detail …

  10. Python __repr__ Method - Complete Guide - ZetCode

    Apr 8, 2025 · Python __repr__ Method Last modified April 8, 2025 This comprehensive guide explores Python's __repr__ method, …

  11. Some results have been removed