[Python-Dev] Re: Have virtual environments led to neglect of the actual environment?

2021-02-27 Thread Stephen J. Turnbull
Paul Moore writes: > The one thing that *is* substantially worse for Python, is the > circumlocutions needed in the documentation to say how to run Python. > But that's 100% down to us not being willing to say "just type the > command python". And the reason for *that* is mostly historical,

[Python-Dev] Re: Have virtual environments led to neglect of the actual environment?

2021-02-27 Thread Stephen J. Turnbull
Jim J. Jewett writes: > > which file am I actually running? > > which interpreter am I actually running? > > how do I tell the computer to use a different interpreter? > > If you need to care about any of these, then the environment is > fighting you -- and the application probably stinks.

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-02-27 Thread Guido van Rossum
We really don’t want users pushing non-exceptions into the list, nor do we want e.g. KeyboardInterrupt to be added to a (non-Base-) ExceptionGroup. There’s a pattern for what you propose using the split() method and a lambda, or you can keep the exceptions in a list and re-wrap them at the end.

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-02-27 Thread Cameron Simpson
On 26Feb2021 02:44, Irit Katriel wrote: >On Fri, Feb 26, 2021 at 2:00 AM Guido van Rossum wrote: >> OT: Is ExceptionGroup *really* immutable in the current >> implementation? As >> long as the 'errors' field is a list, I think one could mutate the list >> directly. > >It's not, but we were

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-02-27 Thread Larry Hastings
On 2/27/21 2:37 AM, Paul Moore wrote: On Fri, 26 Feb 2021 at 23:36, Jim J. Jewett wrote: Whenever I've used except Exception or stronger, it was a sanitary barrier around code that might well do unpredictable or even stupid things. Adding a new kind of exception that I hadn't predicted --

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-02-27 Thread Cameron Simpson
On Fri, 26 Feb 2021 at 23:36, Jim J. Jewett wrote: > Whenever I've used except Exception or stronger, it was a sanitary > barrier around code that might well do unpredictable or even stupid > things. Adding a new kind of exception that I hadn't predicted -- > including ExceptionGroup -- would

[Python-Dev] Re: Have virtual environments led to neglect of the actual environment?

2021-02-27 Thread Nick Coghlan
On Wed, 24 Feb 2021 at 10:49, Random832 wrote: > > I was reading a discussion thread > about > various issues with the Debian packaged version of Python, and the following > statement stood out for me as shocking: > > Christian

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-02-27 Thread Guido van Rossum
On Sat, Feb 27, 2021 at 1:09 PM Jim J. Jewett wrote: > > In fact, if you're happy with RuntimeError here, making > > ExceptionGroup inherit from Exception (instead of > > BaseException) would do just as well -- after all RuntimeError > > is pretty arbitrary > > Agreed, and I think it should

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-02-27 Thread Guido van Rossum
On Sat, Feb 27, 2021 at 2:39 AM Paul Moore wrote: > On Fri, 26 Feb 2021 at 23:36, Jim J. Jewett wrote: > > > > Whenever I've used except Exception or stronger, it was a sanitary > barrier around code that might well do unpredictable or even stupid > things. Adding a new kind of exception that

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-02-27 Thread Jim J. Jewett
> In fact, if you're happy with RuntimeError here, making > ExceptionGroup inherit from Exception (instead of > BaseException) would do just as well -- after all RuntimeError > is pretty arbitrary Agreed, and I think it should inherit from Exception. > (in fact, it's wrong, because the problem

[Python-Dev] Re: Have virtual environments led to neglect of the actual environment?

2021-02-27 Thread Jim J. Jewett
[They are not CS students] > Why is that relevant? Because for many users, python is NOT a programming language; it is an application like any other. It happens to be very powerful and flexible, but the point isn't to program; it is to produce better reports. If the hurdle to get started

[Python-Dev] Re: Have virtual environments led to neglect of the actual environment?

2021-02-27 Thread Paul Moore
On Sat, 27 Feb 2021 at 13:03, Oscar Benjamin wrote: > More recently I've been exploring Julia. You could compare these pages: > > https://docs.python.org/3/tutorial/interpreter.html#invoking-the-interpreter > https://docs.julialang.org/en/v1/manual/getting-started/ > > When installing julia you

[Python-Dev] Re: Have virtual environments led to neglect of the actual environment?

2021-02-27 Thread Steven D'Aprano
On Sat, Feb 27, 2021 at 12:56:17PM +, Oscar Benjamin wrote: > On Sat, 27 Feb 2021 at 11:04, Paul Moore wrote: > > This is 100% true. (At least the part where you say that "it's a > > problem". I'm not sure if "it doesn't need to be like this" is true - > > can you point to a language where

[Python-Dev] Re: Have virtual environments led to neglect of the actual environment?

2021-02-27 Thread Oscar Benjamin
On Sat, 27 Feb 2021 at 11:04, Paul Moore wrote: > > On Sat, 27 Feb 2021 at 01:08, Oscar Benjamin > wrote: > > > > The other point though is that it doesn't need to be like this. If the > > issue was just installing Python and then setting up your PATH then > > that's manageable. The problem is

[Python-Dev] Re: Have virtual environments led to neglect of the actual environment?

2021-02-27 Thread Paul Moore
On Sat, 27 Feb 2021 at 01:08, Oscar Benjamin wrote: > > On Fri, 26 Feb 2021 at 23:06, Jim J. Jewett wrote: > > > > I think his point is that most of his students (economics or business, > > rather than comp sci) will never need to use Perl or C or Java. Python is > > friendly enough to be

[Python-Dev] Re: PEP 654 -- Exception Groups and except* : request for feedback for SC submission

2021-02-27 Thread Paul Moore
On Fri, 26 Feb 2021 at 23:36, Jim J. Jewett wrote: > > Whenever I've used except Exception or stronger, it was a sanitary barrier > around code that might well do unpredictable or even stupid things. Adding a > new kind of exception that I hadn't predicted -- including ExceptionGroup -- >