In earlier versions of the PEP ExceptionGroup was not immutable and split
actually removed matching exceptions from it.
It was also iterable so you could get a flat list of all the contained leaf
exceptions. Then we changed it.
ExceptionGroup is a tree of exceptions, and the internal nodes of the
> And unlike a venv, "python -m" doesn't let you ensure
> that the code executed is the version installed in user site-packages
I have had enough problems with this that when I do modify/replace something, I
put in a marker that I can check for explicitly. Expecting this marker to run
automatic
On Sun, Feb 28, 2021 at 2:40 AM Irit Katriel
wrote:
>
> In earlier versions of the PEP ExceptionGroup was not immutable and split
> actually removed matching exceptions from it.
> It was also iterable so you could get a flat list of all the contained
> leaf exceptions. Then we changed it.
>
> Exc
On Sun, Feb 28, 2021 at 6:17 PM Guido van Rossum wrote:
> On Sun, Feb 28, 2021 at 2:40 AM Irit Katriel
> wrote:
>
>>
>> In earlier versions of the PEP ExceptionGroup was not immutable and split
>> actually removed matching exceptions from it.
>> It was also iterable so you could get a flat list
Looking at the following PEP example, I'm still not sure what he should do to
handle some but not all OSError instances:
...raise ExceptionGroup(
... "eg",
... [
... ValueError(1),
... TypeError(2),
... OSError(3),
...
You can pass an arbitrary function to eg.split() and eg.subgroup(), and
that function can have a side effect. Suppose you want to log and ignore
OSError with errno==ENOENT but re-raise the rest, you can do this:
```
def log_and_ignore(err):
if err.errno == ENOENT:
log(err)
retur
On Sun, 28 Feb 2021 at 07:04, Stephen J. Turnbull
wrote:
>
> 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
Is there a tool that (1) detects import name collisions; and (2) attempts
to read package metadata and package file checksums (maybe from the ZIP
'manifest')?
In order to:
- troubleshoot module shadowing issues
- $PATH
- sys.path
- `python -m site`
- incomplete and overlapping uninstall
This message is longer than I had anticipated.
To aid comprehension, I'm:
- accepting that .split and .subgroup help my "handle some excpetions
but not others" situation, barely
- arguing for ExceptionGroups acting like other containers: truthy if
nonempty, falsey if empty; iterable; .subg
On 27Feb2021 00:54, Irit Katriel wrote:
>On Sat, Feb 27, 2021 at 12:47 AM Jim J. Jewett wrote:
>> > Is this not allowed?
>>
>> >try:
>> >try:
>> >obj.func()# function that raises ExceptionGroups
>> >except AttributeError:
>> >logger.info("obj doesn't have a func")
>> >
On Sat, 27 Feb 2021 at 00:35, Guido van Rossum wrote:
> On Fri, Feb 26, 2021 at 3:18 PM Marco Sulla
> wrote:
>>
>> Excuse me if I post here. Maybe is a stupid question: why, instead of
>> introducing except*, Python can't extend the functionality of except,
>> so it can do what except* would do?
Hi Cameron,
If you go long, I go longer :)
On Sun, Feb 28, 2021 at 10:51 PM Cameron Simpson wrote:
> On 28Feb2021 10:40, Irit Katriel wrote:
> >split() and subgroup() take care to preserve the correct metadata on
> >all
> >the internal nodes, and if you just use them you only make safe
> oper
On 2/28/21, Oscar Benjamin wrote:
>
> - It is possible to configure a default version (although I think you
> have to do it with an environment variable)
The py launcher in Windows supports a "py.ini" file beside the
executable and in %LocalAppData%. The equivalent of the PY_PYTHON,
PY_PYTHON2, a
On Mon, 1 Mar 2021 at 00:13, Eryk Sun wrote:
>
> On 2/28/21, Oscar Benjamin wrote:
> >
> > - It is possible to configure a default version (although I think you
> > have to do it with an environment variable)
>
> The py launcher in Windows supports a "py.ini" file beside the
> executable and in %
On 2/28/21, Oscar Benjamin wrote:
>
> Oh, okay. So does that mean that it's always on PATH unless the user
> *explicitly unticks* the "install the launcher" box for both single
> user and all user installs?
If the launcher gets installed, it will be available in PATH. IIRC,
the installer only all
On 28Feb2021 23:56, Irit Katriel wrote:
>If you go long, I go longer :)
:-)
>On Sun, Feb 28, 2021 at 10:51 PM Cameron Simpson wrote:
>> On 28Feb2021 10:40, Irit Katriel wrote:
>> >split() and subgroup() take care to preserve the correct metadata on
>> >all
>> >the internal nodes, and if you ju
I'm trying to shorten this again...
On Sun, Feb 28, 2021 at 5:54 PM Cameron Simpson wrote:
>
> Let's turn this on its head:
>
> - what specific harm comes from giving EGs container truthiness for size
> testing?
>
For something that's not a pure container, this is an anti-pattern. No
other su
On 28Feb2021 20:05, Guido van Rossum wrote:
>I'm trying to shorten this again...
>
>On Sun, Feb 28, 2021 at 5:54 PM Cameron Simpson wrote:
>> Let's turn this on its head:
>> - what specific harm comes from giving EGs container truthiness for
>> size
>> testing?
>
>For something that's not a pu
18 matches
Mail list logo