Re: [Python-Dev] [Python-checkins] peps: Add PEP 422: Dynamic Class Decorators

2012-06-05 Thread R. David Murray
On Wed, 06 Jun 2012 09:38:39 +1000, Nick Coghlan wrote: > On Wed, Jun 6, 2012 at 9:06 AM, PJ Eby wrote: > > > > > > On Tue, Jun 5, 2012 at 5:31 PM, Terry Reedy wrote: > >> > >> On 6/5/2012 2:26 PM, PJ Eby wrote: > >>> It's for symmetry and straightforward translation with stacked > >>> decorator

Re: [Python-Dev] [Python-checkins] peps: Add PEP 422: Dynamic Class Decorators

2012-06-05 Thread Tres Seaver
On 06/05/2012 07:38 PM, Nick Coghlan wrote: > On Wed, Jun 6, 2012 at 9:06 AM, PJ Eby wrote: >> >> >> On Tue, Jun 5, 2012 at 5:31 PM, Terry Reedy >> wrote: >>> >>> On 6/5/2012 2:26 PM, PJ Eby wrote: It's for symmetry and straightforward translation with stacked decorators, i.e. betwe

Re: [Python-Dev] [Python-checkins] peps: Add PEP 422: Dynamic Class Decorators

2012-06-05 Thread Nick Coghlan
On Wed, Jun 6, 2012 at 9:06 AM, PJ Eby wrote: > > > On Tue, Jun 5, 2012 at 5:31 PM, Terry Reedy wrote: >> >> On 6/5/2012 2:26 PM, PJ Eby wrote: >>> It's for symmetry and straightforward translation with stacked >>> decorators, i.e. between: >>> >>> @deco1 >>> @deco2 >>> [declaration] >>> >>> and

Re: [Python-Dev] [Python-checkins] peps: Add PEP 422: Dynamic Class Decorators

2012-06-05 Thread Greg Ewing
PJ Eby wrote: At the least, if they're not going to be in decorator order, the member shouldn't be called "__decorators__". ;-) Obviously it should be called __srotaroced__. -- Greg ___ Python-Dev mailing list Python-Dev@python.org http://mail.pyth

Re: [Python-Dev] [Python-checkins] peps: Add PEP 422: Dynamic Class Decorators

2012-06-05 Thread PJ Eby
On Tue, Jun 5, 2012 at 5:31 PM, Terry Reedy wrote: > On 6/5/2012 2:26 PM, PJ Eby wrote: > >> On Tue, Jun 5, 2012 at 12:42 PM, Terry Reedy > > wrote: >> > > I think you should just store the decorators in the correct order of >> use >>+__decorators__ = [dec

Re: [Python-Dev] [Python-checkins] peps: Add PEP 422: Dynamic Class Decorators

2012-06-05 Thread Terry Reedy
On 6/5/2012 2:26 PM, PJ Eby wrote: On Tue, Jun 5, 2012 at 12:42 PM, Terry Reedy mailto:tjre...@udel.edu>> wrote: I think you should just store the decorators in the correct order of use +__decorators__ = [deco1, deco2] and avoid the nonsense (time-waste) of making an indire

Re: [Python-Dev] [Python-checkins] peps: Add PEP 422: Dynamic Class Decorators

2012-06-05 Thread Jan Kaliszewski
Terry Reedy dixit (2012-06-05, 12:42): > On 6/5/2012 8:09 AM, nick.coghlan wrote: > > > Add PEP 422: Dynamic Class Decorators [snip] > >+So too will the following be roughly equivalent (aside from inheritance):: > >+ > >+class C: > >+__decorators__ = [deco2, deco1] > > I think you

Re: [Python-Dev] [Python-checkins] peps: Add PEP 422: Dynamic Class Decorators

2012-06-05 Thread PJ Eby
On Tue, Jun 5, 2012 at 12:42 PM, Terry Reedy wrote: > On 6/5/2012 8:09 AM, nick.coghlan wrote: > >Add PEP 422: Dynamic Class Decorators >> > > +Iterating over decorator entries in reverse order >> +-** >> + >> +This order was chosen to match th

Re: [Python-Dev] [Python-checkins] peps: Add PEP 422: Dynamic Class Decorators

2012-06-05 Thread Terry Reedy
On 6/5/2012 8:09 AM, nick.coghlan wrote: Add PEP 422: Dynamic Class Decorators +Iterating over decorator entries in reverse order +- + +This order was chosen to match the layout of lexical decorators when +converted to ordinary function calls