Hello,
Several libraries have complex objects but no comparison operators for them
other than "is" which checks if we are comparing an object with itself.
It would be quite nice to be able to compare any two objects together.
I made this function in python to have a starting point
https://gist.gi
On 2019-09-20 9:52 p.m., Richard Higginbotham wrote:
Andrew Barnert wrote:
set(b).intersection(a) or set(a) & set(b) or sb =
set(b) then [x for x in a if x in sb] and you’re done. They can easily
understand why it works. If they want to know why it’s faster, you can easily
explain it,
and they
Kyle Lahnakoski wrote:
> On 2019-09-20 9:52 p.m., Richard Higginbotham wrote:
> > Andrew Barnert wrote:
> > set(b).intersection(a) or set(a) & set(b) or
> > sb =
> > set(b) then [x for x in a if x in sb] and you’re done. They can easily
> > understand why it works. If they want to know why it’s fas
Nutchanon Ninyawee wrote:
> Hi, Python community
> I would like to discuss with you about the idea of "bidirectional Aliasing".
> I am not good at English wording. I will try my best to communicate the idea
> Link is a language feature that allows multiple variable names to always
> refer to the
>
Hi Sébastien, and welcome.
On Wed, Sep 25, 2019 at 04:15:58PM +0700, Sébastien Eskenaz wrote:
> Hello,
>
> Several libraries have complex objects but no comparison operators for them
> other than "is" which checks if we are comparing an object with itself.
Not true: equality ``==`` is also defin
The asyncio and threading modules include a number of synchronization
primitives. In particular, a Semaphore allows you to limit the number of
concurrent tasks if you need to stay under some capacity constraint.
However, none of the existing primitives provide for rate limiting, as in
making su
Complement to the proposed idea.
Some time ago I thought how cool it would be if one could implement a custom
scheduler for Python's asyncio that used runtime metrics (defined by the user)
to dynamically adjust priorities (with respect to the defined execution order).
E.g. if the developer prior
On Sep 25, 2019, at 02:15, Sébastien Eskenaz wrote:
>
> Hello,
>
> Several libraries have complex objects but no comparison operators for them
> other than "is" which checks if we are comparing an object with itself.
Most of them also have == which does the same comparison, because you get tha