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.Dismiss alert
IsList() with no arguments is equivalent to an empty list, but the user probably just wants to check for a list with any number of items. It should throw an error suggesting that the user write IsList(length=0) or IsList(length=...) to prevent ambiguity. Similar for IsTuple(). Maybe even IsListOrTuple().
The text was updated successfully, but these errors were encountered:
@samuelcolvin will need to confirm, but in my opinion it's fine to just not allow something == IsListOrTuple. That's also still ambiguous, exactly as much as something == IsListOrTuple(). IsListOrTuple is a bit murkier than IsList because at least it allows two possibilities. something == IsList is pointless to allow with its current behaviour because it could just be written as something == [] so that's probably not what the user intends when they write it.
IsList()
with no arguments is equivalent to an empty list, but the user probably just wants to check for a list with any number of items. It should throw an error suggesting that the user writeIsList(length=0)
orIsList(length=...)
to prevent ambiguity. Similar forIsTuple()
. Maybe evenIsListOrTuple()
.The text was updated successfully, but these errors were encountered: