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/2011-September/113527.html below:

[Python-Dev] Maintenance burden of str.swapcase

[Python-Dev] Maintenance burden of str.swapcase [Python-Dev] Maintenance burden of str.swapcaseAntoine Pitrou solipsis at pitrou.net
Wed Sep 7 03:07:58 CEST 2011
On Wed, 7 Sep 2011 10:47:16 +1000
Nick Coghlan <ncoghlan at gmail.com> wrote:
> 
> However, a big +1 for deprecation in the case of bytes and bytearray.
> That's nothing to do with the maintenance burden though, it's to do
> with the semantic confusion between binary data and ASCII-encoded text
> implied by the retention of methods like upper(), lower() and
> swapcase().

A big -1 on that.
Bytes objects are often used for partly ASCII strings, not arbitrary
"arrays of bytes". And making indexing of bytes objects return ints was
IMHO a mistake.

Besides, if you want an array of ints, there's already array.array()
with your typecode of choice. Not sure why other types should conform.

Regards

Antoine.


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