Re: Decoration and aliasing

2007-11-19 Thread Gary Wilson
Jacob Kaplan-Moss wrote: > Oh yeah, and one other thing: > > IANAL, but I think the Python Software License is not compatible with > the BSD, so we'll need permission from the PSF to distribute code > copied from functools.py, and we'll need to include the original > copyright statement. Any

Re: Decoration and aliasing

2007-10-11 Thread Jeremy Dunck
On 10/11/07, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > On 10/8/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > Should I follow up on this with the Python mailing list, or will you? > > I'd love it if you could - thanks! OK, I quickly dug through the mailing list archives to see which one

Re: Decoration and aliasing

2007-10-11 Thread Jacob Kaplan-Moss
On 10/8/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > Should I follow up on this with the Python mailing list, or will you? I'd love it if you could - thanks! Jacob --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups

Re: Decoration and aliasing

2007-10-10 Thread Jeremy Dunck
On 10/8/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > On 10/8/07, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > > > On 10/7/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > > http://code.djangoproject.com/ticket/5701 > > > > Oh yeah, and one other thing: > > > > IANAL, but I think the Python

Re: Decoration and aliasing

2007-10-08 Thread Jeremy Dunck
On 10/8/07, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > On 10/7/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > http://code.djangoproject.com/ticket/5701 > > Oh yeah, and one other thing: > > IANAL, but I think the Python Software License is not compatible with > the BSD, so we'll need

Re: Decoration and aliasing

2007-10-08 Thread Jeremy Dunck
On 10/8/07, Jacob Kaplan-Moss <[EMAIL PROTECTED]> wrote: > > On 10/7/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > I note that this is a (perhaps subtle-enough) backwards-incompatible change. > > Can you say a bit more about how this is backwards-incompatible? I'm > having a dense morning, and

Re: Decoration and aliasing

2007-10-08 Thread Forest Bond
Hi, On Mon, Oct 08, 2007 at 10:49:14AM -0500, Jacob Kaplan-Moss wrote: > On 10/7/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > > I note that this is a (perhaps subtle-enough) backwards-incompatible change. > > Can you say a bit more about how this is backwards-incompatible? I'm > having a dense

Re: Decoration and aliasing

2007-10-08 Thread Jacob Kaplan-Moss
On 10/7/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > http://code.djangoproject.com/ticket/5701 Oh yeah, and one other thing: IANAL, but I think the Python Software License is not compatible with the BSD, so we'll need permission from the PSF to distribute code copied from functools.py, and

Re: Decoration and aliasing

2007-10-08 Thread Jacob Kaplan-Moss
On 10/7/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > I note that this is a (perhaps subtle-enough) backwards-incompatible change. Can you say a bit more about how this is backwards-incompatible? I'm having a dense morning, and can't seem to see any breakage here (which is a good thing!) Jacob

Re: Decoration and aliasing

2007-10-07 Thread Jeremy Dunck
On 10/4/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Thu, 2007-10-04 at 15:15 -0500, Jeremy Dunck wrote: > [...] > > Is there any interest in a patch that modifies Django's built-in > > decorators to use functools.wraps in order to preserve things like > > view function doc strings? >

Re: Decoration and aliasing

2007-10-05 Thread Jacob Kaplan-Moss
On 10/5/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > So, I've found a couple decorators I never knew existed. :) > > Is there a reason django.views.http.require_http_method and friends > aren't documented? Ha - I'd forgotten about those myself :) > I can add docs and tests... Yes, please!

Re: Decoration and aliasing

2007-10-05 Thread Jeremy Dunck
On 10/4/07, Jeremy Dunck <[EMAIL PROTECTED]> wrote: > On 10/4/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > > > On Thu, 2007-10-04 at 15:15 -0500, Jeremy Dunck wrote: > > [...] > > > Is there any interest in a patch that modifies Django's built-in > > > decorators to use functools.wraps

Re: Decoration and aliasing

2007-10-04 Thread Jeremy Dunck
On 10/4/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > On Thu, 2007-10-04 at 15:15 -0500, Jeremy Dunck wrote: > [...] > > Is there any interest in a patch that modifies Django's built-in > > decorators to use functools.wraps in order to preserve things like > > view function doc strings? >

Re: Decoration and aliasing

2007-10-04 Thread Marty Alchin
On 10/4/07, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > > While I'm at it, I think aliasing functools.partial to > > functional.curry would be good, assuming functools is available. > > Providing the functionality is identical. Otherwise it's really, really > painful to work out why

Re: Decoration and aliasing

2007-10-04 Thread Malcolm Tredinnick
On Thu, 2007-10-04 at 15:15 -0500, Jeremy Dunck wrote: [...] > Is there any interest in a patch that modifies Django's built-in > decorators to use functools.wraps in order to preserve things like > view function doc strings? Definitely interest from me. It's a bit of a bug at the moment that we

Re: Decoration and aliasing

2007-10-04 Thread Marty Alchin
> Since Django already includes curry, which is roughly the same as > functools.partial, it'd be pretty easy to back-port "wraps" to Django. > > Is there any interest in a patch that modifies Django's built-in > decorators to use functools.wraps in order to preserve things like > view function

Decoration and aliasing

2007-10-04 Thread Jeremy Dunck
It's fairly well-known that decorators are useful, but raises some issues. Example: == def decorate(f): def wrap(*args, **kwargs): print "called" return f(*args, **kwargs) return wrap @decorate def add_to(augend, addend): "Adds stuff" return augend +