I think some minor changes, could help understand this feature:
- 1. Remove the term "callback": can lead to confusion with a function
defined per call
- 2. Introducing another module name to define "Signal handlers/Receivers"
would help understand this feature involves two different actors.
- 3. Unify the naming of "Signal handlers" / "Signal Receiver", I'm
wondering if we need to keep both terms, or keep the term "receiver"
reserved for the function and use "Signal Handler" for the connected
function.
NB: I didn't make much research on how this kind of feature is explained
in other frameworks / technologies
--
Ticket URL: <https://code.djangoproject.com/ticket/34352>
Django <https://code.djangoproject.com/>
The Web framework for perfectionists with deadlines.
Comment (by Mariusz Felisiak):
> I think some minor changes, could help understand this feature:
> - 1. Remove the term "callback": can lead to confusion with a function
defined per call
"callback" is widely used in Python and Django docs as a function that is
passed to another function as an argument, in this case to
`Signal.connect()`. I don't find it confusing, however, we could rename
`my_callback()` to `my_signal_receiver()` to make it even more clearer.
> - 2. Introducing another module name to define "Signal
handlers/Receivers" would help understand this feature involves two
different actors.
Users can freely organize their code, we recommend keeping signal
receivers in `signals.py`. I'm not sure what other module you're
proposing.
> - 3. Unify the naming of "Signal handlers" / "Signal Receiver"
Agreed we could use the same term.
--
Ticket URL: <https://code.djangoproject.com/ticket/34352#comment:1>
* stage: Unreviewed => Accepted
--
Ticket URL: <https://code.djangoproject.com/ticket/34352#comment:2>