Mark Dickinson <dicki...@gmail.com> added the comment:

> The intersection of an empty set of sets is either the empty set [...]

Nope, it's never the empty set, unless you're using a *very* unusual definition.

The intersection of a collection X of sets is the set of all x in the universe 
such that x is in S for all S in X. If X is empty, that condition is vacuously 
true, and you simply get the set of all x.

There are universe problems here, but giving the empty set is definitely wrong.

OTOH, the union of an empty collection of sets _is_ unambiguously the empty 
set, and the request for `set.union(*args)` to be valid regardless of the 
length of args seems reasonable to me. Without that validity, there's a 
potential corner-case bug where `set.union(*args)` potentially fails when 
`args` is empty.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue35338>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to