Skip to content

add __str__ magic to Person#10

Open
soulseekah wants to merge 1 commit intoduplys:masterfrom
soulseekah:master
Open

add __str__ magic to Person#10
soulseekah wants to merge 1 commit intoduplys:masterfrom
soulseekah:master

Conversation

@soulseekah
Copy link

The author object (of class Person) lacked the magic __str__
method to be eligible for pretty printing in show commands
added the __str__ to return the same as the __unicode__
method

Tested in Python 2.7.3

Before:
$ .gitissues/git-issues show b3 ... Author: <__main__.Person instance at 0x9dbd8cc> ...
After:
Author: John Doe <john@thedoes.cc>

The author object (of class Person) lacked the magic `__str__`
method to be eligible for pretty printing in `show` commands
added the `__str__` to return the same as the `__unicode__`
method
@ghost ghost assigned duplys Nov 21, 2012
@mcepl
Copy link
Contributor

mcepl commented Aug 12, 2014

This could be probably closed ... the equivalent (using self.__unicode__ instead of unicode, which I would otherwise prefer) has been included in d4c0aef.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants