I'd recommend against overloading a boolean flag it this way.  Could you maybe add a string keyword argument `kind`, such that `kind=None` would correspond to `ordered=True`, `kind="unordered"` would correspond to `ordered=False`, while `kind="unique"` would correspond to `ordered=None`?  I think this will make the code a bit clearer. 