xnd-project / libxnd

Subsumed into xnd
https://xnd.io/
BSD 3-Clause "New" or "Revised" License
81 stars 12 forks source link

xnd constructor parameter mutual exclusivity check limit incorrect. #21

Open dmgass opened 6 years ago

dmgass commented 6 years ago

https://github.com/plures/xnd/blob/ad42562ee39bf96b7e40a4d11c502f882f22bcc3/python/xnd/__init__.py#L103

The check includes a tally of 5 parameters. The limit (2) would be correct for 4 parameters. This check is catching some use cases, but not all.

I'm guessing this is unpolished and wasn't tuned to completely shut out the invalid use cases in order to accommodate dtype being needed when values are supplied for typedef and dtypedef. Let me know if submissions like this are unhelpful.