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

Make Event._event public or provide mapping of event names to nametuples #353

Closed
moloney opened this issue May 29, 2019 · 1 comment · Fixed by #355
Closed

Make Event._event public or provide mapping of event names to nametuples #353

moloney opened this issue May 29, 2019 · 1 comment · Fixed by #355

Comments

@moloney
Copy link
Contributor

moloney commented May 29, 2019

Description

Most of my code uses the NotificationEvent / InterventionEvent namedtuples (e.g. as dict keys) since that is the required input for most of the pynetdicom API (i.e. the "bind" methods). However when we get an Event instance in a callback, only the event name is a public attribute.

It would be nice in the private '_event' attribute was made public (although perhaps it needs a different name), or if there were some mapping provided to lookup the namedtuples by the event name. This isn't hard to work around, but figured it would make the API a bit more consistent and ergonomic.

@scaramallion
Copy link
Member

scaramallion commented May 31, 2019

Sounds reasonable

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants