Opened 18 years ago

Closed 18 years ago

#4521 closed (wontfix)

signals should have __(str|repr)__ for debugging/maintenance.

Reported by: (removed) Owned by: Adrian Holovaty
Component: Core (Other) Version: dev
Severity: Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

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.

Attachments (1)

signal-class.patch (2.8 KB ) - added by (removed) 18 years ago.
add django.dispatch.signal func to return a singleton with docstring/label bound in, and usable (str|repr)

Download all attachments as: .zip

Change History (3)

by (removed), 18 years ago

Attachment: signal-class.patch added

add django.dispatch.signal func to return a singleton with docstring/label bound in, and usable (str|repr)

comment:1 by Malcolm Tredinnick, 18 years ago

Triage Stage: UnreviewedReady for checkin

comment:2 by Malcolm Tredinnick, 18 years ago

Resolution: wontfix
Status: newclosed

We're going to end up taking some variation on #4561 and that includes this functionality. So let's punt this exact patch and push the other one to completion.

Note: See TracTickets for help on using tickets.
Back to Top