On 3/23/2020 5:49 AM, Guido van Rossum wrote: > On Sun, Mar 22, 2020 at 6:51 PM Steven D'Aprano <st...@pearwood.info > <mailto:st...@pearwood.info>> wrote: > > We might have a terminology issue here, since according to Wikipedia > there is some dispute over whether or not to include the equality case > in subset/superset: > > https://en.wikipedia.org/wiki/Subset > > For what it is worth, I'm in the school that subset implies proper > subset > [...] > > > Wikipedia's pedantry notwithstanding, I don't think this is a useful > position *when talking about Python sets*, since Python's set's > .issubset() method returns True when the argument is the same set: > >>>> {1}.issubset({1}) > True > > Or did I miss a wink?
The Python way is the mathematically correct way of interpreting the terms "subset" and "superset". Note that the discussion Steven referred to targets the symbol to be used, ie. whether "⊂" (proper subset) should mean the same as "⊆" (subset or equal). As with everything in math, such details are always defined via definitions in the respective paper or book. This can be confusing for the casual reader, but it's not "right" or "wrong". Personally, I find the analogy to "<" vs. "≤" very reasonable, but that still doesn't imply anything wrong with Python, since the "proper subset" property would naturally be called ".ispropersubsect()" :-) -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Experts (#1, Mar 22 2020) >>> Python Projects, Coaching and Support ... https://www.egenix.com/ >>> Python Product Development ... https://consulting.egenix.com/ ________________________________________________________________________ ::: We implement business ideas - efficiently in both time and costs ::: eGenix.com Software, Skills and Services GmbH Pastor-Loeh-Str.48 D-40764 Langenfeld, Germany. CEO Dipl.-Math. Marc-Andre Lemburg Registered at Amtsgericht Duesseldorf: HRB 46611 https://www.egenix.com/company/contact/ https://www.malemburg.com/ _______________________________________________ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-ideas.python.org/ Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/VCY2ABZHN5HK77Z2DHOFDN43SPVCLYW7/ Code of Conduct: http://python.org/psf/codeofconduct/