[Python-ideas] Deprecating rarely used str methods

M.-A. Lemburg mal at egenix.com
Fri Aug 9 12:37:52 CEST 2013


On 09.08.2013 12:07, Richard Oudkerk wrote:
> On 09/08/2013 2:45am, Steven D'Aprano wrote:
>> It's true that, if swapcase were proposed today, it probably wouldn't be
>> accepted.
> 
> Or it would throw an error on a string of more than one character.  I think it is really a
> "character method" rather than a string method.

Just a bit of history:

s.swapcase() exists, because a while back we moved from functions
in string.py to methods on string and unicode objects in Python 2.

The swapcase() function in string.py has been there right from
Python's day 1 in VCS history:

http://hg.python.org/cpython-fullhistory/annotate/5570dbb1ce55/Lib/string.py#l38

author 	Guido van Rossum <guido at python.org>
date 	Sat, 13 Oct 1990 19:23:40 +0000 (1990-10-13)

Instead of deprecating this piece of history, perhaps we should start
deprecating the caps lock key ;-) ... just think of what would give
us: no more accidental yelling on the Internet, confused Nigerian
spammers, fewer problems with password entries, just to name
a few things.

-- 
Marc-Andre Lemburg
eGenix.com

Professional Python Services directly from the Source  (#1, Aug 09 2013)
>>> Python Projects, Consulting and Support ...   http://www.egenix.com/
>>> mxODBC.Zope/Plone.Database.Adapter ...       http://zope.egenix.com/
>>> mxODBC, mxDateTime, mxTextTools ...        http://python.egenix.com/
________________________________________________________________________

::::: Try our mxODBC.Connect Python Database Interface for free ! ::::::

   eGenix.com Software, Skills and Services GmbH  Pastor-Loeh-Str.48
    D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg
           Registered at Amtsgericht Duesseldorf: HRB 46611
               http://www.egenix.com/company/contact/


More information about the Python-ideas mailing list