A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2014-January/131708.html below:

[Python-Dev] PEP 461 - Adding % and {} formatting to bytes

[Python-Dev] PEP 461 - Adding % and {} formatting to bytes [Python-Dev] PEP 461 - Adding % and {} formatting to bytesGlenn Linderman v+python at g.nevcal.com
Thu Jan 16 19:25:28 CET 2014
On 1/16/2014 8:41 AM, Brett Cannon wrote:
> That's a very good catch, Michael! I think that makes sense if there 
> is precedence. Unfortunately that bit from the PEP never made it into 
> the documentation so I'm not sure if there is a 
> backwards-compatibility worry.

No.  If __format__ is called with bytes format, and returns str, there 
would be an exception generated on the spot.

If __format__ is called with bytes format, and tries to use it as str, 
there would be an exception generated on the spot.

Prior to 3.whenever-this-is-implemented, Python 3 only provides str 
formats to __format__, right? So new code is required to pass bytes to 
__format__.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140116/d5fdf8b8/attachment.html>
More information about the Python-Dev mailing list

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