You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.
We have a disproportionally large amount of questions from beginners that relate to the ports argument of convert() functions. We should add stricter typechecking to it (accepting either list or tuple, but nothing else, seems like a good idea), plus a "did you mean?" type diagnostic for passing a single signal in place of an iterable of ports.
The text was updated successfully, but these errors were encountered:
Having been through this (type checking to avoid mistakes) in other contexts, the other way to approach "acceptable type" would be "iterable, but not string-like" (strings are iterable in Python, but often not what you intended to give something that expects an iteratorable).
I'm unsure in this context whether it makes sense to be able to provide, eg, a generator/generator comprehension to the argument. But if it is then checking "iterable, but not string" with a suggestion of passing in a list or tuple (for obviously mistaken input) might be the most useful combination.
The `ports` argument to the `convert` functions is a frequent hotspot of
beginner issues. Check to make sure it is either a list or a tuple, and
give an appropriately helpful error message if not.
Fixes#362.
We have a disproportionally large amount of questions from beginners that relate to the
ports
argument ofconvert()
functions. We should add stricter typechecking to it (accepting eitherlist
ortuple
, but nothing else, seems like a good idea), plus a "did you mean?" type diagnostic for passing a single signal in place of an iterable of ports.The text was updated successfully, but these errors were encountered: