On 16/05/2022 23:22, Filipe Laíns wrote:
No, Python source files are resources too. "resource" is an abstract concept
akin to files, its propose is to allow support other use-cases than just files
on the OS file system (eg. zip file, tarball, database).
Adding a "directory" reference goes agains
Hello,
I was thinking of a way to expand the current try-expect block to support
condinitial expect block. I was imagining the new syntax as
try:
expression block
expect Exception if condition
expression block
where the expect expression block would only run if the condition is met
else
On Tue, 2022-05-17 at 23:04 -0700, Christopher Barker wrote:
> If we go back to the OPs point, they were saying that they didn't like that
> you have to put an __init__.py in a dir in order to put resources in it. And I
> get that idea, but that wouldn't be making a dir a resource, it would be
> al
18.05.22 22:08, Nadav Misgav пише:
I was thinking of a way to expand the current try-expect block to
support condinitial expect block. I was imagining the new syntax as
try:
expression block
expect Exception if condition
expression block
where the expect expression block would only r
Awesome! never seen this syntax used before and the above libraries are not
using it.
Can you elaborate on the else part ? Why is it needed for the syntax to be
correct and could you put any expression in the parenthesis ?
___
Python-ideas mailing list
It's Python's conditional expression, `expression_true if condition else
expression_false`. It's the same thing as C's ternary: `condition ?
expression_true : expression_false`
Also yes, you could put any expression in the parentheses. Just that the empty
one is actually just an empty tuple.
___