Re: [BangPypers] Clojure style multimethod functions in python

2010-08-23 Thread Dhananjay Nene
On Mon, Aug 23, 2010 at 8:36 PM, Baishampayan Ghose wrote: > Dhananjay, > > > Could you help explain in light of the following (the argument lists are > in > > bold). The switcher function is provided exactly the same arguments as > the > > various multimethods. Probably something about clojure I

Re: [BangPypers] Clojure style multimethod functions in python

2010-08-23 Thread Baishampayan Ghose
Dhananjay, > Could you help explain in light of the following (the argument lists are in > bold). The switcher function is provided exactly the same arguments as the > various multimethods. Probably something about clojure I am not aware of ? > > Dhananjay > > def multi(switcher_func): >    """ De

Re: [BangPypers] Clojure style multimethod functions in python

2010-08-23 Thread Dhananjay Nene
On Mon, Aug 23, 2010 at 8:13 PM, Baishampayan Ghose wrote: > > While python's multimethod module allows function overloading based on > > types, here's another approach to do the same based on a switching > function > > (clojure style) or on a set of conditions. > > > > Clojure style multimethod f

Re: [BangPypers] Clojure style multimethod functions in python

2010-08-23 Thread Baishampayan Ghose
> While python's multimethod module allows function overloading based on > types, here's another approach to do the same based on a switching function > (clojure style) or on a set of conditions. > > Clojure style multimethod functions in > python

Re: [BangPypers] Clojure style multimethod functions in python

2010-08-23 Thread Rajeev J Sebastian
On Mon, Aug 23, 2010 at 6:35 PM, Dhananjay Nene wrote: > On Mon, Aug 23, 2010 at 4:26 PM, Rajeev J Sebastian < > rajeev.sebast...@gmail.com> wrote: > >> Probably better to use PEAK Rules >> >> Regards >> Rajeev J Sebastian >> > > That looks much more fully featured indeed. But I couldn't under

Re: [BangPypers] Clojure style multimethod functions in python

2010-08-23 Thread Dhananjay Nene
On Mon, Aug 23, 2010 at 4:26 PM, Rajeev J Sebastian < rajeev.sebast...@gmail.com> wrote: > Probably better to use PEAK Rules > > Regards > Rajeev J Sebastian > That looks much more fully featured indeed. But I couldn't understand why features such as the one I "copy-pasted" below are relevant

Re: [BangPypers] Clojure style multimethod functions in python

2010-08-23 Thread Dhananjay Nene
On Mon, Aug 23, 2010 at 4:26 PM, Rajeev J Sebastian < rajeev.sebast...@gmail.com> wrote: > Probably better to use PEAK Rules > > Regards > Rajeev J Sebastian > That looks much more fully featured indeed. But I couldn't understand why features such as the one I "copy-pasted" below are relevant

Re: [BangPypers] Clojure style multimethod functions in python

2010-08-23 Thread Rajeev J Sebastian
Probably better to use PEAK Rules Regards Rajeev J Sebastian On Mon, Aug 23, 2010 at 4:11 PM, Dhananjay Nene wrote: > While python's multimethod module allows function overloading based on > types, here's another approach to do the same based on a switching function > (clojure style) or on a

[BangPypers] Clojure style multimethod functions in python

2010-08-23 Thread Dhananjay Nene
While python's multimethod module allows function overloading based on types, here's another approach to do the same based on a switching function (clojure style) or on a set of conditions. Clojure style multimethod functions in python