On Sun, 31 Jan 2010 14:27:24 +0200 "Ville M. Vainio" <[email protected]> wrote:
> What I'm thinking is, methods should always be spelled out explicitly > in the class declaration. > > You can manufacture callables easily by instantiating a class that > provides __call__(), or by using closures (my preferred method). > Creating real instancemethods and monkeypatching them to an existing > class sort of obscures the intention (and messes with the magical side > of python). I think you're right, there was really no reason to attach these things to the class, they could have just gone into a list or dict or whatever. As I said, it was part experiment to extend understanding. And it works fine, it's just not robust enough to survive random changes to the source code :-) Cheers -Terry -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/leo-editor?hl=en.
