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/131362.html below:

[Python-Dev] PEP 460 reboot

[Python-Dev] PEP 460 reboot [Python-Dev] PEP 460 rebootGuido van Rossum guido at python.org
Mon Jan 13 04:47:38 CET 2014
On Sun, Jan 12, 2014 at 6:24 PM, Ethan Furman <ethan at stoneleaf.us> wrote:
> On 01/12/2014 06:16 PM, Ethan Furman wrote:
>>
>>
>> If you do :
>>
>> --> b'%s' % 'some text'
>
>
> Ignore what I previously said.  With no encoding the result would be:
>
> b"'some text'"
>
> So an encoding should definitely be specified.

Yes, but the encoding is no business of %s or %. As far as the
formatting operation cares, if the argument is bytes they will be
copied literally, and if the argument is a str (or anything else) it
will call ascii() on it.

-- 
--Guido van Rossum (python.org/~guido)
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