[Python-ideas] `numbers.Natural`

random832 at fastmail.us random832 at fastmail.us
Sun Sep 28 06:13:43 CEST 2014


On Sat, Sep 27, 2014, at 01:04, Chris Angelico wrote:
> Assuming the characters you're after are U+2208 'ELEMENT OF' and
> U+2115 'DOUBLE-STRUCK CAPITAL N', your name would be is∈ℕ(). I'd
> prefer isℕ() for two reasons: firstly, ∈ is a symbol, so it's not
> valid in a name (though you could open the other can of worms and ask
> for it to be an operator - then you could spell it "x ∈ ℕ" instead of
> "isℕ(x)"), and secondly because it's much more common to ask "is
> natural?" than "is element-of natural?" in function names. But I think
> this has long gone into crazyland.

Speaking of the other can of worms... we already _have_ that operator,
it is spelled "in". What we don't have is infinite sets.


More information about the Python-ideas mailing list