Jaymon / pout

Python pretty print on steroids
MIT License
29 stars 0 forks source link

Fix formatting if __pout__ method returns just a string #66

Closed Jaymon closed 2 years ago

Jaymon commented 3 years ago

So you've got a class:

class Foo(object):
    def __pout__(self):
        return "Foo pout"

When you print out the class you get some strange formatting:

>>> f = Foo()
>>> print(f)
Foo instance at 0x7f521bf1add0
<    "Foo pout"
>

I should make the formatting better if __pout__ just returns a string.