Re: Creating very similar functions with different parameters

2011-10-25 Thread 88888 Dihedral
Thanks for the debug modes in functional programing! Everything functional is true in CS at least in the theroy! -- http://mail.python.org/mailman/listinfo/python-list

Re: Creating very similar functions with different parameters

2011-10-25 Thread Ian Kelly
On Mon, Oct 24, 2011 at 3:29 PM, Andrew Berg wrote: > I want to create a decorator with two different (but very similar) > versions of the wrapper function, but without copying giant chunks of > similar code. The main difference is that one version takes extra > parameters. > > def test_dec(func,

Re: Creating very similar functions with different parameters

2011-10-24 Thread Steven D'Aprano
On Mon, 24 Oct 2011 16:29:25 -0500, Andrew Berg wrote: > I want to create a decorator with two different (but very similar) > versions of the wrapper function, but without copying giant chunks of > similar code. The main difference is that one version takes extra > parameters. > > def test_dec(fu

Re: Creating very similar functions with different parameters

2011-10-24 Thread alex23
Guido wrote an article on a quick and easy multimethod implementation using a decorator: http://www.artima.com/weblogs/viewpost.jsp?thread=101605 -- http://mail.python.org/mailman/listinfo/python-list