Skip to content

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

@KotlinIsland

Description

@KotlinIsland
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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions