Re: Using closures and partial functions to eliminate redundant code

2007-09-27 Thread Bjoern Schliessmann
Matthew Wilson wrote: > I'm interested to hear how other people deal with really similar > code. > The similarity just bugs me. However, I wonder if using stuff > like closures or partial function application is needlessly showy. ACK -- but not because it's showy, but because it may be more erro

Re: Using closures and partial functions to eliminate redundant code

2007-09-27 Thread Paul Hankin
On Sep 27, 3:01 am, Matthew Wilson <[EMAIL PROTECTED]> wrote: > I wrote some code to create a user and update a user on a remote box by > sending emails to that remote box. When I was done, I realized that my > create_user function and my update_user function were effectively > identical except fo

Re: Using closures and partial functions to eliminate redundant code

2007-09-27 Thread Bruno Desthuilliers
Matthew Wilson a écrit : > I wrote some code to create a user and update a user on a remote box by > sending emails to that remote box. When I was done, I realized that my > create_user function and my update_user function were effectively > identical except for different docstrings and a single d

Re: Using closures and partial functions to eliminate redundant code

2007-09-26 Thread Gabriel Genellina
En Wed, 26 Sep 2007 23:01:17 -0300, Matthew Wilson <[EMAIL PROTECTED]> escribi�: > I wrote some code to create a user and update a user on a remote box by > sending emails to that remote box. When I was done, I realized that my > create_user function and my update_user function were effectively

Re: Using closures and partial functions to eliminate redundant code

2007-09-26 Thread timaranz
On Sep 27, 2:01 pm, Matthew Wilson <[EMAIL PROTECTED]> wrote: > I wrote some code to create a user and update a user on a remote box by > sending emails to that remote box. When I was done, I realized that my > create_user function and my update_user function were effectively > identical except fo

Re: Using closures and partial functions to eliminate redundant code

2007-09-26 Thread Paul McGuire
On Sep 26, 9:01 pm, Matthew Wilson <[EMAIL PROTECTED]> wrote: > I wrote some code to create a user and update a user on a remote box by > sending emails to that remote box. When I was done, I realized that my > create_user function and my update_user function were effectively > identical except fo

Using closures and partial functions to eliminate redundant code

2007-09-26 Thread Matthew Wilson
I wrote some code to create a user and update a user on a remote box by sending emails to that remote box. When I was done, I realized that my create_user function and my update_user function were effectively identical except for different docstrings and a single different value inside: ### V