[issue15474] Differentiate decorator and decorator factory in docs

2020-02-26 Thread Raymond Hettinger

Raymond Hettinger  added the comment:

Thanks Andrés.  

I'm going to close this one as it has been open for a long time and not 
attracted interest.  Also, in practice this ambiguity doesn't seem to be an 
issue and people almost universally refer to anything usable with the 
@-notation as a decorator.  Further, it has become common for tooling such as 
@lru_cache and @dataclass to be usable both with and without arguments, so the 
distinction no longer makes sense in some cases.

--
nosy: +rhettinger
resolution:  -> out of date
stage: needs patch -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15474] Differentiate decorator and decorator factory in docs

2020-02-26 Thread Andrés Delfino

Andrés Delfino  added the comment:

Hi, no I'm no longer working on this.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15474] Differentiate decorator and decorator factory in docs

2020-02-23 Thread Andrei Daraschenka

Andrei Daraschenka  added the comment:

Hi, Andrés Delfino. Are you still working on it? I could help with this issues.

--
nosy: +dorosch

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15474] Differentiate decorator and decorator factory in docs

2019-06-04 Thread Andrés Delfino

Andrés Delfino  added the comment:

Great! I'll definitely give it a look.

I prefer not to make a PR until everything is in its place. You can check the 
status though:

https://github.com/andresdelfino/cpython/tree/decorators-howto

Fred was very helpful with his insight :)

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15474] Differentiate decorator and decorator factory in docs

2019-06-04 Thread Ezio Melotti


Ezio Melotti  added the comment:

If you want some early feedback I believe you can already create a PR and mark 
it as work-in-progress/don't-merge.

If you need some material you can find the slides of a talk about decorators 
that I did at
https://www.pycon.it/media/conference/slides/understanding-decorators.pdf
Feel free to take from it whatever you need :)

--
versions: +Python 3.7, Python 3.8, Python 3.9 -Python 2.7, Python 3.2, Python 
3.3, Python 3.4

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15474] Differentiate decorator and decorator factory in docs

2019-06-04 Thread Andrés Delfino

Andrés Delfino  added the comment:

Hi Windson Yang! Yes, I'm still working on it. I'll have it ready by the end of 
June.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15474] Differentiate decorator and decorator factory in docs

2019-06-03 Thread Windson Yang

Windson Yang  added the comment:

Hi, Andrés Delfino. Are you still working on it?

--
nosy: +Windson Yang

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15474] Differentiate decorator and decorator factory in docs

2018-06-18 Thread Andrés Delfino

Andrés Delfino  added the comment:

Alright! :D Yes, your help will definitely come in handy, thanks!

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15474] Differentiate decorator and decorator factory in docs

2018-06-18 Thread Fred L. Drake, Jr.

Fred L. Drake, Jr.  added the comment:

I like Éric's terminology; giving a concrete name to the concept makes it a lot 
easier to grasp, and this doesn't require inventing any new component terms.

Andrés, if you'd like to tackle this, that's great!  I'd be happy to for you to 
bounce drafts through me if you like.

--
nosy: +fdrake

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15474] Differentiate decorator and decorator factory in docs

2018-06-18 Thread Andrés Delfino

Andrés Delfino  added the comment:

If deemed appropriate, I can take the task of writing a HOWTO for 
decorators/decorators factories.

--
nosy: +adelfino

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15474] Differentiate decorator and decorator factory in docs

2012-11-22 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
nosy: +chris.jerdonek

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15474
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15474] Differentiate decorator and decorator factory in docs

2012-11-22 Thread Ezio Melotti

Ezio Melotti added the comment:

The tutorial doesn't seem to mention decorators, do you think this should be 
covered there?
FWIW while explaining decorators I usually use 3 examples:
 1) a simple decorator that accepts a function, does something, and returns the 
same function;
 2) a decorator that defines and returns an inner function;
 3) a decorator factory, that defines two nested inner functions

Not sure if it's necessary to include the first example though.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15474
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15474] Differentiate decorator and decorator factory in docs

2012-11-22 Thread Nick Coghlan

Nick Coghlan added the comment:

No, using decorators needs to be in the tutorial, but writing your own is a 
metaprogramming task that's beyond the tutorial's scope.

A HOWTO guide would be appropriate, though.

--

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15474
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15474] Differentiate decorator and decorator factory in docs

2012-11-09 Thread Ezio Melotti

Changes by Ezio Melotti ezio.melo...@gmail.com:


--
keywords: +easy
nosy: +ezio.melotti
stage:  - needs patch
type:  - enhancement
versions: +Python 3.4

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15474
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue15474] Differentiate decorator and decorator factory in docs

2012-07-27 Thread Éric Araujo

New submission from Éric Araujo mer...@netwok.org:

Some of the confusion encountered when writing decorators arise from the 
difference between a decorator (@something) and a decorator factory 
(@something(args)).  It would help to adopt this clearer terminology in our 
docs: a decorator takes the decorated function as argument and does its 
business, a decorator factory takes some arguments and returns a decorator 
which wraps the decorated function.

(I think it was Nick who suggested this in a recent-ish mailing list thread.)

--
assignee: docs@python
components: Documentation
messages: 166600
nosy: docs@python, eric.araujo, ncoghlan
priority: normal
severity: normal
status: open
title: Differentiate decorator and decorator factory in docs
versions: Python 2.7, Python 3.2, Python 3.3

___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue15474
___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com