Re: MethodChain

2008-07-20 Thread James Coglan
> Name clashes aren't an issue, since MethodChain doesn't apply any > special meaning to the method names it knows; the limitation is > because JavaScript doesn't allow you to modify property lookup > behavior.  And since we can make the chain object callable

Re: MethodChain

2008-07-20 Thread Miles
On Sun, Jul 20, 2008 at 1:01 AM, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > The methods are a problem IMHO. You can't add an own method/function with > the name `fire()` or `toFunction()`. `MethodChain` has to know all > functions/methods in advance. Yo

Re: MethodChain

2008-07-19 Thread Paul McGuire
On Jul 20, 12:01 am, Marc 'BlackJack' Rintsch <[EMAIL PROTECTED]> wrote: > The methods are a problem IMHO.  You can't add an own method/function with > the name `fire()` or `toFunction()`.  `MethodChain` has to know all > functions/methods in advance.  You can add t

Re: MethodChain

2008-07-19 Thread Marc 'BlackJack' Rintsch
On Sat, 19 Jul 2008 13:57:33 -0700, bearophileHUGS wrote: > Marc 'BlackJack' Rintsch: >> What's called `MethodChain` there seems to be function composition in >> functional languages. Maybe `functools` could grow a `compose()` function. > > To me it looks lik

Re: MethodChain

2008-07-19 Thread bearophileHUGS
Marc 'BlackJack' Rintsch: > What's called `MethodChain` there seems to be function composition in > functional languages. Maybe `functools` could grow a `compose()` function. To me it looks like a quite more "refined" thing, it's an object, it has some specia

Re: MethodChain

2008-07-19 Thread Marc 'BlackJack' Rintsch
using-ojay-chains-to-express-yourself-clearly/ What's called `MethodChain` there seems to be function composition in functional languages. Maybe `functools` could grow a `compose()` function. Ciao, Marc 'BlackJack' Rintsch -- http://mail.python.org/mailman/listinfo/python-list

MethodChain

2008-07-19 Thread bearophileHUGS
Found from Reddit, it's for e ECMA(Java)Script, but something similar may be useful for Python too: http://jsclass.jcoglan.com/methodchain.html http://blog.jcoglan.com/2008/07/16/where-did-all-my-code-go-using-ojay-chains-to-express-yourself-clearly/ Bye, bearophile -- http://mail.python.org/mail