Convenience full_name method for User#949
Convenience full_name method for User#949tsnoam merged 1 commit intopython-telegram-bot:masterfrom graynk:user-full-name
Conversation
…me is present or just the first name if not
|
In many locales format should be "surname name" (which is BTW more useful for sorting), so it's better to make locale as incoming optional parameter and return full_name depending on locale. |
Codecov Report
@@ Coverage Diff @@
## master #949 +/- ##
==========================================
- Coverage 91.8% 91.69% -0.12%
==========================================
Files 103 103
Lines 4040 4044 +4
Branches 638 639 +1
==========================================
- Hits 3709 3708 -1
- Misses 193 197 +4
- Partials 138 139 +1
|
|
I don't think this information is in python locale module though? |
|
@graynk you're right, for some strange reason, there is no such info in Python's locale module. |
|
Looks good to me. Closes #943 |
|
thank you for your contribution |
Returns full name (first + last) if last name is present or just the first name if not present.