Skip to content

Commit caec4ab

Browse files
authored
fix HumanName repr for names with single quotes
eg `HumanName("O'NEILL")`
1 parent ab8e5b5 commit caec4ab

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

nameparser/parser.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -150,7 +150,7 @@ def __repr__(self):
150150
if self.unparsable:
151151
_string = "<%(class)s : [ Unparsable ] >" % {'class': self.__class__.__name__, }
152152
else:
153-
_string = "<%(class)s : [\n\ttitle: '%(title)s' \n\tfirst: '%(first)s' \n\tmiddle: '%(middle)s' \n\tlast: '%(last)s' \n\tsuffix: '%(suffix)s'\n\tnickname: '%(nickname)s'\n]>" % {
153+
_string = "<%(class)s : [\n\ttitle: %(title)r \n\tfirst: %(first)r \n\tmiddle: %(middle)r \n\tlast: %(last)r \n\tsuffix: %(suffix)r\n\tnickname: %(nickname)r\n]>" % {
154154
'class': self.__class__.__name__,
155155
'title': self.title or '',
156156
'first': self.first or '',

0 commit comments

Comments
 (0)