Re: [Tutor] decorators -- treat me like i'm 6.. what are they.. why are they?

2016-07-07 Thread Alan Gauld via Tutor
On 06/07/16 20:35, bruce wrote: > But, what are decorators, why are decorators? who decided you needed them! Thinking about this a little wider than Python. Decorators are a standard software design pattern and were first(?) formally documented in the famous book known as the "Gang of Four" (GoF

Re: [Tutor] decorators -- treat me like i'm 6.. what are they.. why are they?

2016-07-06 Thread Steven D'Aprano
On Wed, Jul 06, 2016 at 03:35:16PM -0400, bruce wrote: > Hi. > > Saw the decorator thread earlier.. didn't want to pollute it. I know, > I could google! > > But, what are decorators, why are decorators? who decided you needed > them! Sometimes you find yourself writing many functions (or metho

Re: [Tutor] decorators -- treat me like i'm 6.. what are they.. why are they?

2016-07-06 Thread Danny Yoo
> As to who suggested them you'd need to go back through the > PEPs to see who first suggested it, and then maybe more to see > who's idea finally got accepted. I think it was in Python 2.5. Hi Bruce, Yes, it happened back around 2003: https://www.python.org/dev/peps/pep-0318/ Decorators

Re: [Tutor] decorators -- treat me like i'm 6.. what are they.. why are they?

2016-07-06 Thread Alan Gauld via Tutor
On 06/07/16 20:35, bruce wrote: > Saw the decorator thread earlier.. didn't want to pollute it. I know, I > could google! > > But, what are decorators, why are decorators? who decided you needed them! decorators are things that modify functions in standard ways. Specifically they are functions t

Re: [Tutor] decorators -- treat me like i'm 6.. what are they.. why are they?

2016-07-06 Thread Alex Hall
On Wed, Jul 6, 2016 at 4:56 PM, Alex Hall wrote: > > > On Wed, Jul 6, 2016 at 3:35 PM, bruce wrote: > >> Hi. >> >> Saw the decorator thread earlier.. didn't want to pollute it. I know, I >> could google! >> >> But, what are decorators, why are decorators? who decided you needed them! >> > > I th

Re: [Tutor] decorators -- treat me like i'm 6.. what are they.. why are they?

2016-07-06 Thread Alex Hall
On Wed, Jul 6, 2016 at 3:35 PM, bruce wrote: > Hi. > > Saw the decorator thread earlier.. didn't want to pollute it. I know, I > could google! > > But, what are decorators, why are decorators? who decided you needed them! > They're functions that modify the decorated function. If I make a functi

[Tutor] decorators -- treat me like i'm 6.. what are they.. why are they?

2016-07-06 Thread bruce
Hi. Saw the decorator thread earlier.. didn't want to pollute it. I know, I could google! But, what are decorators, why are decorators? who decided you needed them! Thanks! ___ Tutor maillist - Tutor@python.org To unsubscribe or change subscription o