[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Python-Dev] bpo-34595: How to format a type name?


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~