python-devtools icon indicating copy to clipboard operation
python-devtools copied to clipboard

(🐞) when using `devtools.pformat` within a `__repr__`, the output becomes duplicated

Open KotlinIsland opened this issue 11 months ago • 0 comments

from devtools import pformat
from devtools.prettier import pprint


class A:
    def __repr__(self):
        return pformat(1)


pprint(A())  # 11

here i would expect the output to be 1, but it is 11

KotlinIsland avatar Feb 11 '25 03:02 KotlinIsland