Terminology. Let's use the official terminology rather than making stuff up. The docs at http://docs.python.org/3/library/string.html#formatspec use the following terminology: Replacement field: {...}; contains field name, conversion, format spec in that order, all optional. Field name: either a decimal integer (referring to an argument by position) or an identifier (by name), or omitted (uses the next available position). Conversion: !r, !s, !a; these refer to repr(), str(), ascii() to the value, and then the format spec applies to the resulting string. Format spec: colon, bunch of stuff, type; the type is a letter such as d (decimal) or s (string), and the stuff between the colon and the type is used to specify field width, alignment, sign, padding and such. Also. {:b} means binary (i.e. numbers in base 2). I'm not sure what this leaves for interpolating bytes if we don't want to use {:s}. The docs at http://docs.python.org/3/library/stdtypes.html#printf-style-string-formatting don't show %b so it could still be used there, but it would be nicer to be consistent. -- --Guido van Rossum (python.org/~guido)
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4