[Python-ideas] Re: Adding syntax for the empty set

2021-04-09 Thread Skip Montanaro
> > $ def unpack_set(): > > return {*()} > > > $ dis.dis(unpack_set) > 2 0 BUILD_SET0 > 2 LOAD_CONST 1 (()) > 4 SET_UPDATE 1 > 6 RETURN_VALUE > Seems like the peephole optimizer could be trained t

[Python-ideas] Re: Looking for people interested in a Python register virtual machine project

2021-03-23 Thread Skip Montanaro
> > So, neither "research" nor "production" seems to be a correct > > descriptor. > > Not even government funding agencies distinguish between "research" > and "itch-scratching" as long as you self-promote enough! :-) I agree > with Paul, feel free to call it "research"! Along similar lines, wh

[Python-ideas] Re: Looking for people interested in a Python register virtual machine project

2021-03-23 Thread Skip Montanaro
> a) You're working with CPython bleeding edge. > b) You find that (bleeding edge) adding extra chore. > c) Nobody told you to work on bleeding (nor boss, nor a maintainer who > said "I'll merge it once you've done"), > > Then: why do you complicate your task by working on bleeding edge? > Could ta

[Python-ideas] Re: Looking for people interested in a Python register virtual machine project

2021-03-22 Thread Skip Montanaro
Thanks for the response. I will try to address your comments inline. > I guess it should be a good idea to answer what's the scope of this > project - is it research one or "production" one? If it's research one, > why be concerned with the churn of over-modern CPython versions? > Wouldn't it be b

[Python-ideas] Re: Looking for people interested in a Python register virtual machine project

2021-03-22 Thread Skip Montanaro
> Yeah, that is old writing, so is probably less clear (no pun intended) > than it should be. In frame_dealloc, Py_CLEAR is called for > stack/register slots instead of just Py_XDECREF. Might not be > necessary. Also, the intent is not to change any semantics here. The implementation of RETURN_VAL

[Python-ideas] Re: Looking for people interested in a Python register virtual machine project

2021-03-22 Thread Skip Montanaro
> In the "Object Lifetime" section you say "registers should be cleared upon > last reference". That isn't safe, since there can be hidden dependencies on > side effects of __del__, e.g.: > > process_objects = create_pipeline() > output_process = process_objects[-1] > return output_pr

[Python-ideas] Re: Looking for people interested in a Python register virtual machine project

2021-03-20 Thread Skip Montanaro
also intended to be the same thing, and for a while > had a fair number of contributors. Unfortunately, it never obtained the > performance wins that were good for. > > On Sat, Mar 20, 2021, 11:55 AM Skip Montanaro > wrote: > >> Back in the late 90s (!) I worked on a reimagi

[Python-ideas] Looking for people interested in a Python register virtual machine project

2021-03-20 Thread Skip Montanaro
hon's internals. Questions/comments/pull requests welcome. Skip Montanaro ___ Python-ideas mailing list -- python-ideas@python.org To unsubscribe send an email to python-ideas-le...@python.org https://mail.python.org/mailman3/lists/python-idea

[Python-ideas] DB-API support for sets?

2019-05-22 Thread Skip Montanaro
The DB-API doesn't support sets directly, so you wind up having to manually expand them: >>> curs.execute("select count(*) from sometable where somecol in ?", >>> ({4126,11638},)) Traceback (most recent call last): File "", line 1, in sqlite3.OperationalError: near "?": syntax error >>> curs.e

Re: [Python-ideas] [Python-Dev] A reminder for PEP owners

2017-09-13 Thread Skip Montanaro
> But someone has to > review and accept all those PEPs, and I can't do it all by myself. An alternate definition for BDFL is "Benevolent Delegator For Life." :-) Skip ___ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman