[Python-ideas] [RFC] draft PEP: Dedicated infix operators for matrix multiplication and matrix power
Steven D'Aprano
steve at pearwood.info
Mon Mar 24 13:06:31 CET 2014
On Sun, Mar 23, 2014 at 08:48:49PM -0700, Devin Jeanpierre wrote:
> On Sun, Mar 23, 2014 at 8:12 PM, Steven D'Aprano <steve at pearwood.info> wrote:
> > I think it is highly unlikely that people will be frightened off from
> > overloading @ by the name. If people happily use __lt__ for subset
> > checking, which is *nothing* like less-than,
>
> Actually, no. <, or "less than", is the exact way it's spelled for any
> partial order, and subset relations are probably the most famous
> non-numeric example of a partial order.
I will accept that subsets are an example of partial order and so I was
wrong to say that that it has nothing to do with __lt__ and __gt__.
But I disagree that < is the usual symbol for subset. Neither Wikipedia
nor Wolfram Mathworld mention it:
https://en.wikipedia.org/wiki/Subset
http://mathworld.wolfram.com/Subset.html
I was taught to use symbols ⊂ and ⊆ for proper subset and subset-or-
equal. I've also seen ⊊ and ⊂ used instead. But prior to Python, I've
never seen < used. If it's used in mathematics, it's a niche use.
--
Steven
More information about the Python-ideas
mailing list