[Python-Dev] bpo-34595: How to format a type name?
Ethan Furman
ethan at stoneleaf.us
Tue Sep 11 21:00:57 EDT 2018
On 09/11/2018 05:21 PM, Barry Warsaw wrote:
> MRAB wrote on 9/11/18 16:06:
>> Perhaps we could have a single format code plus an optional '#' for
>> the "alternate form":
>>
>> %T for short form
>> %#T for fully qualified name
>
> OTOH, if %T and variants meant "type" but %t mean something entirely
> different, that *would* probably be confusing.
I think folks used to %-formatting are already used to un-related but
similar codes (and related but dissimilar):
- %M for minute
- %m for month (or maybe I have that backwards)
- %H for 24-hour clock
- %I for 12-hour clock
- %w for weekday as decimal number
- %W for week number of the year
I always have to look it up. :(
--
~Ethan~
More information about the Python-Dev
mailing list