[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
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
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
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
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
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
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-
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