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

[Python-Dev] PEP 460 reboot

[Python-Dev] PEP 460 rebootDaniel Holth dholth at gmail.com
Mon Jan 13 03:30:35 CET 2014
On Sun, Jan 12, 2014 at 9:18 PM, Guido van Rossum <guido at python.org> wrote:
> On Sun, Jan 12, 2014 at 6:07 PM, Daniel Holth <dholth at gmail.com> wrote:
>> Is there a formatting character that means "anything except a unicode
>> string" to prevent accidentally interpolating a Unicode string into a
>> bytes string without [a sane] encoding?
>
> No, and we shouldn't introduce one. An operation should either work
> for no type, one type, a few specific types, or all types. Something
> that works for all but one type will *appear* to work for all types to
> a casually experimenting user and may pass extensive unittests,
> leaving a bomb that can detonate when you least expect it.

That pretty much describes how I feel about str(bytes). I would accept
"only a bytes" or "only a string" as consolation formatting characters
:-)
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