Re: Behavior of the for-else construct

2022-03-05 Thread Avi Gross via Python-list
I am not clear on what you are commenting, Dennis. You are responding to what I do not believe I wrote. You did not quote the part of my message where I wrote what "I" did in the early 80's and did not say when PASCAL was available elsewhere. "I paid no attention to where PASCAL was being used

Re: Cpython: when to incref before insertdict

2022-03-05 Thread Inada Naoki
On Sat, Mar 5, 2022 at 11:22 PM Marco Sulla wrote: > > I noticed that some functions inside dictobject.c that call insertdict > or PyDict_SetItem do an incref of key and value before the call, and a > decref after it. An example is dict_merge. First of all, insertdict and PyDict is totally differ

Re: Behavior of the for-else construct

2022-03-05 Thread Dennis Lee Bieber
On Sat, 5 Mar 2022 21:40:08 + (UTC), Avi Gross declaimed the following: >I am not sure how we end up conversing about PASCAL on a Python forum. But it >is worth considering how people educated in aspects of Computer Science often >come from somewhat different background and how it flavors w

Re: Help: Unable to find IDLE folder inside the Python Lib folder

2022-03-05 Thread MRAB
On 2022-03-05 20:36, Deji Olofinboba via Python-list wrote: Dear Python officer, Please I am new to programming. I have justinstalled the python 3.10.2. After the installation, I was able to locate thePython Shell but unable to locate IDLE despite checking it before downloading in the python i

Help: Unable to find IDLE folder inside the Python Lib folder

2022-03-05 Thread Deji Olofinboba via Python-list
Dear Python officer, Please I am new to programming. I have justinstalled the python 3.10.2. After the installation, I was able to locate thePython Shell but unable to locate IDLE despite checking it before downloading in the python installation folder. I also reinstalled Python and checked IDL

Re: Behavior of the for-else construct

2022-03-05 Thread Cameron Simpson
On 05Mar2022 17:48, Avi Gross wrote: >Since we still seem to be dreaming, I wonder when someone will suggest using >some variation of the new match statement. Ugh :-) But... What if break were implemented with an exception, like StopIteration but for interruption instead of stop? And for-loop

Re: Behavior of the for-else construct

2022-03-05 Thread Avi Gross via Python-list
I am not sure how we end up conversing about PASCAL on a Python forum. But it is worth considering how people educated in aspects of Computer Science often come from somewhat different background and how it flavors what they do now. I paid no attention to where PASCAL was being used other than I

Re: virtualenv and make DESTDIR=

2022-03-05 Thread Barry Scott
> On 5 Mar 2022, at 19:56, Hartmut Goebel wrote: > > Am 05.03.22 um 17:34 schrieb Barry Scott: >> Have the RPM install all the pythone code and dependencies and also install >> a short script that >> sets up PYTHONPATH, LD_LIBRARY_PATH, etc and execs the python3 .py. > The scripts are already

Re: Behavior of the for-else construct

2022-03-05 Thread Michael F. Stemper
On 04/03/2022 18.11, Peter J. Holzer wrote: On 2022-03-04 23:47:09 +, Avi Gross via Python-list wrote: I am not sure a reply is needed, Peter, and what you say is true. But as you point out, when using a German keyboard, I would already have a way to enter symbols like ä, ö, ü and ß and no

Re: Behavior of the for-else construct

2022-03-05 Thread Dennis Lee Bieber
On Sat, 5 Mar 2022 12:39:36 -0600, "Michael F. Stemper" declaimed the following: >... especially Pascal, which was probably bigger in Germany and Austria >in the 1980s than was C. Pascal also defined alternate representations (per Jensen&Wirth) for some of those (and I don't recall ever

Re: virtualenv and make DESTDIR=

2022-03-05 Thread Barry Scott
> On 5 Mar 2022, at 19:56, Hartmut Goebel wrote: > > Am 05.03.22 um 17:34 schrieb Barry Scott: >> Have the RPM install all the pythone code and dependencies and also install >> a short script that >> sets up PYTHONPATH, LD_LIBRARY_PATH, etc and execs the python3 .py. > The scripts are already

Re: virtualenv and make DESTDIR=

2022-03-05 Thread Hartmut Goebel
Am 05.03.22 um 17:34 schrieb Barry Scott: Have the RPM install all the pythone code and dependencies and also install a short script that sets up PYTHONPATH, LD_LIBRARY_PATH, etc and execs the python3 .py. The scripts are already created by entry-points. So basically this means to reinvent th

Re: Behavior of the for-else construct

2022-03-05 Thread Avi Gross via Python-list
Since we still seem to be dreaming, I wonder when someone will suggest using some variation of the new match statement. All you need is for the for loop (and possibly other such constructs) to return some kind of status that can be matched match (for var in something: ... ) :

Re: virtualenv and make DESTDIR=

2022-03-05 Thread Kirill Ratkin
Hi, As far I know there is tool rpmvenv (https://github.com/kevinconway/rpmvenv). Try it, maybe ot helps. 04.03.2022 16:03, Hartmut Goebel wrote: Hi, How can I make installing a virtual environment honor DESTDIR? How can I install a virtual environment in $(DESTDIR)$(PREFIX), which behaves

looking for a freelancer to update a python NNTP script

2022-03-05 Thread RS Wood
I'm looking for a mid-level python programmer to help me with a python script that accesses Usenet. I've got a non-working 2.7 script that needs a little more attention than just running 2to3 on it. Estimated level of effort: about 2 hours or less. If interested please send me an email at moc.l

Re: virtualenv and make DESTDIR=

2022-03-05 Thread Barry Scott
> On 5 Mar 2022, at 16:59, Marco Sulla wrote: > > On Sat, 5 Mar 2022 at 17:36, Barry Scott wrote: >> Note: you usually cannot use pip when building an RPM with mock as the >> network is disabled inside the build for >> security reasons. > > Can't he previously download the packages and run

Re: virtualenv and make DESTDIR=

2022-03-05 Thread Marco Sulla
On Sat, 5 Mar 2022 at 17:36, Barry Scott wrote: > Note: you usually cannot use pip when building an RPM with mock as the > network is disabled inside the build for > security reasons. Can't he previously download the packages and run pip on the local packages? -- https://mail.python.org/mailman

Re: virtualenv and make DESTDIR=

2022-03-05 Thread Barry Scott
> On 4 Mar 2022, at 13:03, Hartmut Goebel wrote: > > Hi, > > How can I make installing a virtual environment honor DESTDIR? How can I > install a virtual environment in $(DESTDIR)$(PREFIX), which behaves as being > set-up in $(PREFIX)? (Of course, this virtual environment can not be used. My

Re: Getting Syslog working on OSX Monterey

2022-03-05 Thread Barry Scott
> On 4 Mar 2022, at 21:23, Peter J. Holzer wrote: > > On 2022-02-28 22:05:05 +, Barry Scott wrote: >> On 28 Feb 2022, at 21:41, Peter J. Holzer wrote: >>> On 2022-02-27 22:16:54 +, Barry wrote: I have always assumed that if I want a logger syslog handler that I would have >

Cpython: when to incref before insertdict

2022-03-05 Thread Marco Sulla
I noticed that some functions inside dictobject.c that call insertdict or PyDict_SetItem do an incref of key and value before the call, and a decref after it. An example is dict_merge. Other functions, such as _PyDict_FromKeys, don't do an incref before. When an incref of key and value is needed b

Re: Behavior of the for-else construct

2022-03-05 Thread Rob Cliffe via Python-list
On 05/03/2022 01:15, Cameron Simpson wrote: I sort of wish it had both "used break" and "did not use break" branches, a bit like try/except/else. And "zero iterations". Rob Cliffe -- https://mail.python.org/mailman/listinfo/python-list

Re: Behavior of the for-else construct

2022-03-05 Thread Peter J. Holzer
On 2022-03-05 00:25:44 +0100, Peter J. Holzer wrote: > On 2022-03-04 11:34:07 +1100, Chris Angelico wrote: > > What I'm hearing is that there are, broadly speaking, two types of > > programmers [1]: > > > > 1) Those who think about "for-else" as a search tool and perfectly > > understand how it be