[Python-Dev] sWAPcASE Was: transform() and untransform() methods, and the codec registry (original) (raw)
Raymond Hettinger raymond.hettinger at gmail.com
Thu Dec 9 23:54:24 CET 2010
- Previous message: [Python-Dev] transform() and untransform() methods, and the codec registry
- Next message: [Python-Dev] sWAPcASE Was: transform() and untransform() methods, and the codec registry
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Dec 9, 2010, at 12:29 PM, Alexander Belopolsky wrote:
The str type already has 40+ methods many of which are not well-suited to handle the complexities inherent in Unicode. Rather than rushing in two more methods that will prove to be about as useful as str.swapcase(), lets consider actual use cases and come up with a design that will properly address them.
It would make me happy if we could agree to kill or at least mortally wound str.swapcase(). I did some research on what it is go for and found that it is a vestige of an old word processor command to handle the case where a user accidentally left the caps lock key turned-on. AFAICT using Google's code search, it has nearly zero value for Python scripts. It does have a cost however, the code search turned-up many cases where people were writing string like objects and included swapcase() just so they could match the built-in API.
It's time for swapcase() to go the way of the dinosaurs.
Raymond
-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://mail.python.org/pipermail/python-dev/attachments/20101209/57c1a585/attachment.html>
- Previous message: [Python-Dev] transform() and untransform() methods, and the codec registry
- Next message: [Python-Dev] sWAPcASE Was: transform() and untransform() methods, and the codec registry
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]