Re: [Python-3000] PEP Draft: Class Decorators

2007-03-09 Thread Brett Cannon
[SNIP] > class FormFactory(Form): > id_to_form = {} # { account_id : { form_id : form_class } } > @staticmethod > def register(cls, account_id, form_id): > FormFactory.id_to_form.setdefault(cls.account_id, {}) > assert form_id not in FormFactory.id_to_form[cls.account_id

Re: [Python-3000] PEP Draft: Class Decorators

2007-03-09 Thread Jack Diederich
On Fri, Mar 09, 2007 at 06:19:49PM -0600, Collin Winter wrote: > >History and Implementation > >== > > > >Class decorators were originally proposed alongside function decorators > >in PEP318 [1]_ and were rejected by Guido [2]_ for lack of use cases. > >Two years later he sa

Re: [Python-3000] PEP Draft: Class Decorators

2007-03-09 Thread Collin Winter
You need to run this through a spellchecker; I noticed at least a dozen typos. Other comments inline. Collin Winter On 3/9/07, Jack Diederich <[EMAIL PROTECTED]> wrote: > PEP: 3XXX > Title: Class Decorators > Version: 1 > Last-Modified: 28-Feb-2007 > Authors: Jack Diederich > Implementation: SF#1

Re: [Python-3000] PEP Draft: Class Decorators

2007-03-09 Thread Jack Diederich
I got lots of feedback on the PEP at PyCon and the two main responses were "heck yeah!" and "what does a class decorator look like?" I've added some simple examples for the "what is?" and some other examples that should help explain the "heck yeah" responses too. I'm cc'ing [EMAIL PROTECTED] for

Re: [Python-3000] PEP Draft: Class Decorators

2007-03-09 Thread Jack Diederich
On Fri, Mar 09, 2007 at 01:21:49PM -0800, Brett Cannon wrote: > On 2/28/07, Collin Winter <[EMAIL PROTECTED]> wrote: > >On 2/28/07, Jack Diederich <[EMAIL PROTECTED]> wrote: > >[snip] > >> History and Implementation > >> == > >> > >> Class decorators were originally proposed

Re: [Python-3000] PEP Draft: Class Decorators

2007-03-09 Thread Brett Cannon
On 2/28/07, Collin Winter <[EMAIL PROTECTED]> wrote: > On 2/28/07, Jack Diederich <[EMAIL PROTECTED]> wrote: > [snip] > > History and Implementation > > == > > > > Class decorators were originally proposed in PEP318 [1]_ and were rejected > > by Guido [2]_ for lack of use ca

Re: [Python-3000] PEP Draft: Class Decorators

2007-02-28 Thread Collin Winter
On 2/28/07, Jack Diederich <[EMAIL PROTECTED]> wrote: [snip] > History and Implementation > == > > Class decorators were originally proposed in PEP318 [1]_ and were rejected > by Guido [2]_ for lack of use cases. Two years later he saw a use case > he liked and gave the go-

[Python-3000] PEP Draft: Class Decorators

2007-02-28 Thread Jack Diederich
Greetings from PyCon! I read hundreds of emails in the dozens of threads about class decorators and there was surprisingly little content (most of the arguments were about syntax which is no longer up for debate). As a result this PEP is quite plain. If any IronPython or Jython folks could throw