RE: The Zen of D.E.K.

2023-01-14 Thread avi.e.gross
I can appreciate a beautiful piece of code but I can also appreciate another piece of code that does things in another pleasing way so there is quite a bit of subjectivity here. And, in yet another computer language, the implementation of what seems to be the same algorithm is somewhat jarring as

RE: To clarify how Python handles two equal objects

2023-01-14 Thread Jen Kris via Python-list
Avi, Your comments go farther afield than my original question, but you made some interesting additional points.  For example, I sometimes work with the C API and sys.getrefcount may be helpful in deciding when to INCREF and DECREF.  But that’s another issue.  The situation I described in my

Re: To clarify how Python handles two equal objects

2023-01-14 Thread Chris Angelico
On Sun, 15 Jan 2023 at 10:32, Jen Kris via Python-list wrote: > The situation I described in my original post is limited to a case such as x > = y ... the assignment can be done simply by "x" taking the pointer to "y" > rather than moving all the data from "y" into the memory buffer for "x" > I

Re: To clarify how Python handles two equal objects

2023-01-14 Thread Jen Kris via Python-list
Yes, in fact I asked my original question – "I discovered something about Python array handling that I would like to clarify" -- because I saw that Python did it that way.  Jan 14, 2023, 15:51 by ros...@gmail.com: > On Sun, 15 Jan 2023 at 10:32, Jen Kris via Python-list > wrote: > >> The si

Re: To clarify how Python handles two equal objects

2023-01-14 Thread Chris Angelico
On Sun, 15 Jan 2023 at 11:38, Jen Kris wrote: > > Yes, in fact I asked my original question – "I discovered something about > Python array handling that I would like to clarify" -- because I saw that > Python did it that way. > Yep. This is not specific to arrays; it is true of all Python objec

Re: To clarify how Python handles two equal objects

2023-01-14 Thread Roel Schroeven
Chris Angelico schreef op 15/01/2023 om 1:41: On Sun, 15 Jan 2023 at 11:38, Jen Kris wrote: > > Yes, in fact I asked my original question – "I discovered something about Python array handling that I would like to clarify" -- because I saw that Python did it that way. > Yep. This is not spec

Re: To clarify how Python handles two equal objects

2023-01-14 Thread Frank Millman
On 2023-01-15 4:36 AM, Roel Schroeven wrote: Chris Angelico schreef op 15/01/2023 om 1:41: On Sun, 15 Jan 2023 at 11:38, Jen Kris wrote: > > Yes, in fact I asked my original question – "I discovered something about Python array handling that I would like to clarify" -- because I saw that Py

Fast lookup of bulky "table"

2023-01-14 Thread Dino
Hello, I have built a PoC service in Python Flask for my work, and - now that the point is made - I need to make it a little more performant (to be honest, chances are that someone else will pick up from where I left off, and implement the same service from scratch in a different language (G