[Python-Dev] clarification on PEP 3124 status (original) (raw)
Darren Dale dsdale24 at gmail.com
Sat Sep 12 15:57:58 CEST 2009
- Previous message: [Python-Dev] Anyone knows how to compile pywin32 for 64bit operating system
- Next message: [Python-Dev] clarification on PEP 3124 status
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Could somebody please clarify the status of PEP 3124? At http://ftp.python.org/dev/peps/ , it is listed as "under consideration", but http://ftp.python.org/dev/peps/pep-3124/ says it has been deferred.
I was reading through the discussion on the python-3000 mailing list archive, and at one point somebody asked for other examples where generic functions are used in the community. The numpy project has a basic generic function mechanism for numpy's ufuncs (regular functions that operate on arrays), where subclasses of numpy.ndarray can define array_prepare (this method will be added in numpy-1.4) and array_wrap methods, which are sort of analogous to @before and @after in PEP 3124 (ndarray subclasses define an array_priority attribute to decide how to dispatch). The numpy approach is not a general solution and is not as flexible as what is described in the PEP, but it can be used by functions that operate on subclasses that implement matrices, masked arrays, arrays with physical units.
I would be very interested in seeing a framework for generic functions in the numpy standard library. I think would be more simple and flexible than what we currently have. Is there still interest/motivation for supporting generic functions in the standard library?
Darren
- Previous message: [Python-Dev] Anyone knows how to compile pywin32 for 64bit operating system
- Next message: [Python-Dev] clarification on PEP 3124 status
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]