-
Notifications
You must be signed in to change notification settings - Fork 4
Open
Labels
Milestone
Description
Following each expression, an optional type conversion may be specified. The allowed conversions are '!s', '!r', or '!a'. These are treated the same as in str.format(): '!s' calls str() on the expression, '!r' calls repr() on the expression, and '!a' calls ascii() on the expression. These conversions are applied before the call to format(). The only reason to use '!s' is if you want to specify a format specifier that applies to str, not to the type of the expression.