Hi Montana,
As Cameron Simpson already pointed out, your query is off-topic for the
Python-Dev mailing list and should be taken to the Python-Ideas mailing
list, which is for speculative discussion of new designs.
Like Cameron, I've CCed Python-Ideas. Please send any follow-ups to that
list an
On 5/28/2019 11:35 PM, Montana Burr wrote:
What is the justification for causing list == 3 to evaluate to False,
besides the obvious "a list cannot equal a number"?
That is completely sufficient. The default comparison is by id, and a
class must override to get something different. The 'def
Ok, now I'm mildly curious to knpw:
What is the justification for causing list == 3 to evaluate to False,
besides the obvious "a list cannot equal a number"?
On Tue, May 28, 2019 at 9:34 PM Montana Burr wrote:
> Ok, now I'm mildly curious to knpw:
>
> What is the justification for causing list
On 27/05/2019 04:52:17, Montana Burr wrote:
NumPy arrays have this awesome feature, where array == 3 does an
element-wise comparison and returns a list. For example:
np.array([1,2,3,4,5])==3
returns
[False,False,True,False,False]
It would be cool if Python had similar functionality for lis
This belongs on python-ideas, not python-dev. I've directed replies to
this message there. Comments below.
On 26May2019 21:52, Montana Burr wrote:
NumPy arrays have this awesome feature, where array == 3 does an
element-wise comparison and returns a list. For example:
np.array([1,2,3,4,5])==3
NumPy arrays have this awesome feature, where array == 3 does an
element-wise comparison and returns a list. For example:
np.array([1,2,3,4,5])==3
returns
[False,False,True,False,False]
It would be cool if Python had similar functionality for lists.
If that is not possible, perhaps we could co