mirror of
https://gitflic.ru/project/openide/openide.git
synced 2025-12-16 22:51:17 +07:00
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
19 lines
227 B
Python
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()
|