Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Signals don't have a name, which makes it hard for logging #2

Closed
madjar opened this issue Aug 5, 2014 · 1 comment
Closed

Signals don't have a name, which makes it hard for logging #2

madjar opened this issue Aug 5, 2014 · 1 comment

Comments

@madjar
Copy link
Contributor

madjar commented Aug 5, 2014

As of now, signals don't have name, which means it is impossible, given a signal object, to know what signal it actually is, for example when logging a failure.

An optional name argument would be nice, even-though it would introduce some repetition

pre_setup_conf = signalslot.Signal(name='pre_setup_conf', args=['conf'])

To avoid the repetition, we could define signals as classes?

class pre_setup_conf(signalslot.Signal):
    args = ['conf']
@jpic
Copy link
Member

jpic commented Aug 5, 2014

Holding the name would be useful indeed, pull requests would be acceptable ;)

It sounds fun to make a SignalMetaclass but maybe it's too early.

@jpic jpic closed this as completed in 302510d Sep 17, 2014
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants