-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Hi!
I've noticed that sometimes, the function concatArray in Semigroup.py receives a list and a tuple to concat, which results in the following error:
TypeError: can only concatenate tuple (not "list") to tuple
In my local copy of the library, I've changed it to this just to get things working:
def concatArray(xs):
def _1(ys):
foo = tuple(xs)
bar = tuple(ys)
return bar if not foo else foo if not bar else foo + bar
return _1But that feels a bit off.
Is there a general policy for tuples vs lists in python-land? For example, in Data.Functor in the prelude, I see that tuple is used, but in Data.Array I see that list is used.
If tuples and lists can be used interchangeably, then I'd make sure that the concat operator is changed to something like the code above.
Metadata
Metadata
Assignees
Labels
No labels