An `importlib.resources.as_file` equivalent but for whole directories.
To access a directory of files in a package and load them (for example, a
skybox with 6 faces), one would need to use `as_file` 6 times with 6 context
managers. Moreover, if the API required a path to a folder that contained
I've been unable to find a discussion on the following subject.
I think structural pattern matching could sometimes be more useful to
be available to form an expression than to form a statement. To be
specific, given the definition of a function of the form
```
def f():
match :
case
On Mon, 9 May 2022 at 08:35, Jeremiah Vivian
wrote:
>
> I've always thought of relaxing the restrictions. It's actually easy to
> implement (even including attribute assignment/subscript assignment) and I
> had to modify only two files (plus regenerate the parser).
I think attribute assignment
On Sun, 2022-05-08 at 17:36 +, [email protected] wrote:
> An `importlib.resources.as_file` equivalent but for whole directories.
>
> To access a directory of files in a package and load them (for example, a
> skybox with 6 faces), one would need to use `as_file` 6 times with 6 context
>
On 08/05/2022 13:08, Valentin Berlier wrote:
A while ago there was a discussion about allowing "match" patterns for the
walrus operator. This would cover iterable unpacking as you suggested along with all the
patterns allowed in match statements.
if [x, y, z] := re.match(r"...").groups(