Re: [sage-devel] Re: overloading * for Set intersection

2022-03-29 Thread G. M.-S.
Sorry, I did not find anything about this in the docs for Sets (but I should have tried the operators for Python sets). Guillermo On Tue, 29 Mar 2022 at 20:25, Matthias Koeppe wrote: > -1 on this; as Sébastien says, we already have overloaded the bitwise > operators &, | for this -- which is

[sage-devel] Re: overloading * for Set intersection

2022-03-29 Thread Matthias Koeppe
-1 on this; as Sébastien says, we already have overloaded the bitwise operators &, | for this -- which is consistent with Python's operators for set and frozenset - https://docs.python.org/3/library/stdtypes.html#set (Note Python's set and frozenset do not support +.) On Tuesday, March 29, 2022

[sage-devel] Re: overloading * for Set intersection

2022-03-29 Thread Sébastien Labbé
Why not use "&" and "|" ? sage: A = Set([1,2,3,4,5]) sage: B = Set([3,4,5,6,7]) sage: A & B {3, 4, 5} sage: A | B {1, 2, 3, 4, 5, 6, 7} On Tuesday, March 29, 2022 at 11:34:14 AM UTC+2 GMS wrote: > > I have noticed the overloading of + for Set union, which I find very > convenient. > >