Files
openide/python/testData/debug/test_string_representation_in_variables_view.py
Egor.Eliseev ebf5d71eef PY-35529 Use repr by default in Variables View
1. If `__repr__` is overridden - use `reprlib` or `repr()`
2. If `__str__` is overridden - use `str()`
3. Use `reprlib` or `repr()` otherwise

IJ-CR-110917

GitOrigin-RevId: dff583d556600a8c77024a4d1bd86034f24f9bf9
2023-07-18 08:33:05 +00:00

19 lines
227 B
Python

class FooStr:
def __str__(self):
return "str"
class FooRepr:
def __repr__(self):
return "repr"
class FooReprlib:
pass
foo_str = FooStr()
foo_repr = FooRepr()
foo_reprlib = FooReprlib()
print()