[Python-ideas] Inline assignments using "given" clauses
brenbarn at brenbarn.net
Sun May 13 14:27:38 EDT 2018
On 2018-05-13 04:23, Steven D'Aprano wrote:
> In my experience mathematicians put the given *before* the statement:
> Given a, b, c three sides of a triangle, then
> Area = sqrt(s*(s-a)*(s-b)*(s-c))
> where s = (a + b + c)/2 is the semi-perimeter of the triangle.
> For the record, that is almost exactly what I wrote for a student
> earlier today, and its not just me, it is very similar to the wording
> used on both Wolfram Mathworld and Wikipedia's pages on Heron's Formula.
> Putting "given" after the expression is backwards.
Yes, but that's because we're ruling out the use of "where". At this
point I would be fine with "snicklefritz" as the keyword. The point is
that I want to put SOMETHING after the expression, and this is not at
all unusual. See for instance Wikipedia pages on the Reimann zeta
If we have to use the word "given" even though the word mathematicians
would use in that position is "where", that's not such a big deal.
"Do not follow where the path may lead. Go, instead, where there is no
path, and leave a trail."
More information about the Python-ideas