The implementation in https://github.com/inducer/pymbolic/blob/master/pymbolic/primitives.py#L609 causes collections.Iterable to consider all pymbolic expressions iterable (although they are explicitly not). I am not sure on the correct way to fix this, as I do not know the reason this error-raising implementation has been added. I am working around this for now, just wanted to let you know.