-
Notifications
You must be signed in to change notification settings - Fork 93
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
nitclk properties/functions that accept ViSession in C should only accept nitclk.SessionReference in Python #1042
Comments
For ease of use, the first two options are useful in different places.
I think it would be bad to take one type for the functions but require a different type for the get/set ViSession attributes, so we should take either in both places. Taking the integer nitclk session number would be a back door in case there is something we missed, however, requiring the creation of |
Note: |
Let's say someone is putting together their own NI-RFSA Python bindings because #984 and that user wants to use |
We discussed this at length in today's code review.
|
Closed by #1026 |
Description of issue
In #1005 we agreed on the following:
#1026 implements it.
I want to push back on this proposal for 3 reasons:
1. From Zen of Python:
If we implement the suggestion, then you can pass either
[my_scope_session, my_digital_session]
or[my_scope_session.nitclk, my_digital_session.nitclk]
tonitclk
functions.2. From Zen of Python:
[my_scope_session.nitclk, my_digital_session.nitclk]
is explicit.3. Assymmetry in property set/get
An additional strange behavior introduced by the poposal is that on attributes of type
nitclk.SessionReference
, users can set with anniscope.Session
but when the user gets it, it would be returned asnitclk.SessionReference
. I think this is confusing.The text was updated successfully, but these errors were encountered: