On 12 January 2014 16:52, Kristján Valur Jónsson <kristjan at ccpgames.com> wrote: > I mean, basically what I am suggesting is that in addition to %b with > > def helper(o): > return str(o).encode('ascii', 'strict') > > b'foo%bbar'%(helper(myobj), ) > > you have > > b'foo%sbar'%(myobj, ) But that's not what the current PEP says. It uses %s for interpolating bytes values. It looks like you're saying that b'abc %s' % (b'def') will *not* produce b'abc def', but rather will produce b'abc b\'def\'' (because str(b'def'') is "b'def'"). If that's what you're saying, then fine, but it's a different PEP and I for one am -1 specifically because of the behaviour I show above. Paul
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