On Mon, Aug 10, 2020 at 9:05 AM Alex Hall wrote:
> Yes, we can implement things in Python that aren't allowed in formal
> mathematics and some fun questions arise. What should `set.UNIVERSAL in
> set.UNIVERSAL` return? Bertrand Russell thinks it's False.
>
Well... Russell thinks that the answer
On Mon, Aug 10, 2020 at 12:20:49PM +0100, haael wrote:
>
> Forgive me if this has already been discussed.
>
>
> Could we add the idea of "negative" sets to Python? That means sets that
> contain EVERYTHING EXCEPT certain elements.
Can you give an example of what you would use this for? A
On Mon, Aug 10, 2020 at 2:20 PM Stephen J. Turnbull <
turnbull.stephen...@u.tsukuba.ac.jp> wrote:
> haael writes:
>
> > Could we add the idea of "negative" sets to Python? That means
> > sets that contain EVERYTHING EXCEPT certain elements.
>
> This is usually called the "complement" of a set.
On 08/10 12:20, haael wrote:
>
> Forgive me if this has already been discussed.
>
>
> Could we add the idea of "negative" sets to Python? That means sets that
> contain EVERYTHING EXCEPT certain elements.
>
>
> First, let's have a universal set that contains everything.
>
> assert
On 8/10/20 7:20 AM, haael wrote:
> myset = set.UNIVERSAL
> myset.remove(element)
You do realize that set.UNIVERSAL isn't the set of everything anymore?
You bound myset to be an alias for set.UNIVERSAL and then modified it.
You likely wanted to make a copy of set.UNIVERSAL, not just bind
You could create such a class with a few lines of code by inheriting from
collections.abc.MutableSet
You as anyone with a pontual problem that would benefit from such a
construct -
I can't see why/when this would be useful unless in a project already
dealing
with symbolic/lazy mathematical