On Sun, Jul 19, 2020 at 1:34 PM Thomas Moreau
wrote:
> While it would be nice to have simpler identifiers for objects, it would
> be hard to make it work for multiprocessing, as objects in different
> interpreter would end up having the same repr. Shared objects (locks) might
> also have differen
On Sun, Jul 19, 2020 at 3:00 PM Tobias Kohn wrote:
> Quoting Koos Zevenhoven :
>
> > (1) Class pattern that does isinstance and nothing else.
> >
> > If I understand the proposed semantics correctly, `Class()` is
> equivalent to checking `isinstance(obj, Class)`, also when `__match_args__`
> is n
On 7/19/20 4:30 PM, Thomas Moreau wrote:
> Dear all,
>
> While it would be nice to have simpler identifiers for objects, it
> would be hard to make it work for multiprocessing, as objects in
> different interpreter would end up having the same repr. Shared
> objects (locks) might also have differen
Dear all,
While it would be nice to have simpler identifiers for objects, it would be
hard to make it work for multiprocessing, as objects in different
interpreter would end up having the same repr. Shared objects (locks) might
also have different serial numbers depending on how many objects have
On Sun, 19 Jul 2020 18:38:30 +0300
Serhiy Storchaka wrote:
> I have problem with the location of hexadecimal memory address in custom
> reprs.
>
>
>
> vs
>
>
How about putting it in parentheses, to point more clearly that it can
most of the time be ignored:
> I do not propose
That looks expensive, esp. for objects implemented in Python — an extra
dict entry plus a new unique int object. What is the problem you are trying
to solve for these objects specifically? Just that the hex numbers look
distracting doesn’t strike me as sufficient motivation.
On Sun, Jul 19, 2020 a
On Sun, Jul 19, 2020 at 06:38:30PM +0300, Serhiy Storchaka wrote:
> What if use serial numbers to differentiate instances?
I like this idea. It is similar to how Jython and IronPython object IDs
work:
# Jython
>>> id(None)
2
>>> id(len)
3
>>> object()
> I do not
I have problem with the location of hexadecimal memory address in custom
reprs.
vs
The long hexadecimal number makes the repr longer and distracts
attention from other useful information. We could get rid of it, but it
is useful if we want to distinguish objects of the same type.
On 08/07/2020 16:15, MRAB wrote:
On 2020-07-08 03:08, Rob Cliffe via Python-Dev wrote:
Why not use '=' to distinguish binding from equality testing:
case Point(x, =y): # matches a Point() with 2nd parameter equal to
y; if it does, binds to x.
This would allow a future (or present!) exte
Hi Terry,
Thank you: I really like your wave/particules analogy. I think that
pattern matching is indeed uniting different concepts to build a
stronger, more versatile structure.
I also like your concept of a general "binding structure" with
different forms, such as assignment, parame
Hi Koos,
Let me try and address some of the concerns and questions you are
rising. I am replying here to two emails of yours so as to keep
traffic down.
Quoting Koos Zevenhoven :
> (1) Class pattern that does isinstance and nothing else.
If I understand the proposed semantics correc
11 matches
Mail list logo