Skip to content

Commit 74359e9

Browse files
committed
Refined Person.plain_name() to avoid leading or trailing spaces when only one name component is present.
- Legacy-Id: 15456
1 parent 97db5f7 commit 74359e9

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

ietf/person/name.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ def initials(name):
7171

7272
def plain_name(name):
7373
prefix, first, middle, last, suffix = name_parts(name)
74-
return u" ".join([first, last])
74+
return u" ".join( n for n in (first, last) if n)
7575

7676
def capfirst(s):
7777
# Capitalize the first word character, skipping non-word characters and

0 commit comments

Comments
 (0)