[Python-3000] removing functions from string module (original) (raw)
Josiah Carlson jcarlson at uci.edu
Wed Apr 18 03:19:04 CEST 2007
- Previous message: [Python-3000] removing functions from string module
- Next message: [Python-3000] removing functions from string module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Christian Heimes <lists at cheimes.de> wrote:
Neal Norwitz schrieb: > I'm tempted to ask the same thing about the types module. Don't forget the 'new' module. It's a candidate for 'svn rm'. """Create new objects of various types. Deprecated. This module is no longer required except for backward compatibility. Objects of most types can now be created by calling the type object. """
I would generally agree with you, except that when monkey patching instances... self.method = new.instancemethod(other.method.im_func, self, self.class)
... is a bit more understandable than... self.metbod = type(other.method)(other.method.im_func, self, self.class)
... at least in the examples that I've seen. Never mind that new is documented in the standard library documentation, but the types are not.
- Josiah
- Previous message: [Python-3000] removing functions from string module
- Next message: [Python-3000] removing functions from string module
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]