[Python-Dev] A thought on generic functions (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Fri May 30 00:57:51 CEST 2008
- Previous message: [Python-Dev] A thought on generic functions
- Next message: [Python-Dev] A thought on generic functions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Nick Coghlan wrote:
I don't think it would actually be that much worse - something like typetools.ProxyMixin would just involve a whole series of register calls instead of method definitions. I wouldn't expect the total amount of code involved to change much.
I'm not thinking about the xxx methods, they're an aberration. I'm thinking about all the user-defined methods and attributes that get caught in one go by the getattr method of the proxy.
That said, a recursive flatten() implementation is indeed a problem that generic functions are well suited to solving
Yes, I agree with that. It was just something I thought of that shows that generic functions and OO are not quite equivalent in general.
-- Greg
- Previous message: [Python-Dev] A thought on generic functions
- Next message: [Python-Dev] A thought on generic functions
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]