[Python-ideas] Inline assignments using "given" clauses
Greg Ewing
greg.ewing at canterbury.ac.nz
Sun May 13 08:31:24 EDT 2018
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.
I agree, and "where" would be my first choice, but...
given... that "where" is not available, "given" seems
like the next best choice. At least it doesn't sound
blatantly wrong in that position.
--
Greg
More information about the Python-ideas
mailing list