Sujet : Re: Await expressions
De : ram (at) *nospam* zedat.fu-berlin.de (Stefan Ram)
Groupes : comp.lang.pythonDate : 28. Jan 2024, 16:09:12
Autres entêtes
Organisation : Stefan Ram
Message-ID : <expr-20240128155450@ram.dialup.fu-berlin.de>
References : 1 2 3 4 5 6
dieter.maurer@online.de writes:
You can explain a function call without saying much about the called function.
Similarly, you can explain "await <expr>" without saying much about
"<expr>".
Thanks, Greg and Dieter! The intention of my post was twofold:
To better understand "await", but also to suggest that the
documentation can be improved.
When I have a syntax section and then a semantics section,
the syntax introduces terms that can then be referred to
in the semantics section.
For example:
| Syntax:
|
|expression + expression
|
| Semantic
|
|Evaluates to the sum of the values of the two expressions.
This is clear to me. Notice how "expressions" in the Semantics
section refers to the two "expression" in the Syntax section.
What would be less clear:
| Syntax:
|
|expression + expression
|
| Semantic
|
|Evaluates to the sum of two numbers.
What "two numbers"? Yes, now we can guess that these numbers must
be the values of the expressions, but it's less clear.
I think that the author of the specification could improve
the specification by addressing my questions from the OP,
but I am not able to submit a suggestion for a wording myself,
because I am still learning asyncio.