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

Zinc python bindings returning scalar for 1 element list #161

Open
rchristie opened this issue Nov 26, 2020 · 0 comments
Open

Zinc python bindings returning scalar for 1 element list #161

rchristie opened this issue Nov 26, 2020 · 0 comments
Labels

Comments

@rchristie
Copy link
Contributor

In the python bindings for certain Zinc APIs which generally return a list of values, there is a special case where a scalar is returned if there is one value.
This is irritating, as it requires turning the scalar into a list to work with the same client code.
Particularly bad example:
Element.getScaleFactors() which returns a list if there are 0 or >1 values, but a scalar if there is 1.
All python APIs which can return a list should return a list, even if one element in it.

@rchristie rchristie added the bug label Nov 26, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant