signals should have __(str|repr)__ for debugging/maintenance.
|Reported by:||(removed)||Owned by:||adrian|
|Cc:||Triage Stage:||Ready for checkin|
|Has patch:||yes||Needs documentation:||no|
|Needs tests:||no||Patch needs improvement:||no|
django.dispatch.dispatcher.An(y|onymous) singletons derive from a 'Parameter' class, basically providing a default repr, docstring. Useful for those signals, but should be generalized so that it's usable for other custom signals for any poor folks trying to yet again optimize dispatch :)
Attached is a patch adding a custom _signal class; it's not required for creation of a specific signal to connect to, merely advisable- adds in str/repr automatically (and docstring if supplied) making things a bit simpler for folks debugging.
Change History (3)
Changed 7 years ago by (removed)
comment:1 Changed 7 years ago by mtredinnick
- Needs documentation unset
- Needs tests unset
- Patch needs improvement unset
- Triage Stage changed from Unreviewed to Ready for checkin