On 02/23/2014 02:54 PM, Nick Coghlan wrote: > > It's a harm containment tactic, based on the assumption people *will* > want to include the output of ascii() in binary protocols containing > ASCII segments, regardless of whether or not we consider their reasons > for doing so to be particularly good. One possible problem with %a -- it becomes the bytes equivalent of %s in Python 2 strings, with the minor exception of how unicode strings are handled (quote marks are added). In other words, instead of %d, one could use %a. On the other hand, %a is so much more user-friendly than b'%s' % ('%d' % 123).encode('ascii', errors='backslashreplace'). -- ~Ethan~
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