[Python-ideas] Predicate Sets

Chris Angelico rosuav at gmail.com
Mon Jan 20 09:09:53 CET 2014


On Mon, Jan 20, 2014 at 6:56 PM, Andrew Barnert <abarnert at yahoo.com> wrote:
> Also, this isn't a Set in Python terms—or an Iterable or a Sized; it's just a Container. Which is perfectly reasonable, and means len(s) and iter(s) failing is exactly what you should expect. But the name could lead people to expect it to be a Set. Then again, "predicatecontainer" sounds horrible, so maybe the small potential for confusion is fine.
>

If I might be permitted to bikeshed the name a little: My first
thought (from the subject line) was that this was a set *of*
predicates, not a set *defined by a* predicate. But a frozenset isn't
a set of frozens either, so this might be less confusing than I
thought.

ChrisA


More information about the Python-ideas mailing list