Re:Introduction to Python for Computational Science and Engi...
by kazinator on Friday November 25, 2016 @06:14PM
(#13040577)
It is abosolutely being more explicit. It's being more explicit that (expt b 5) is a unit that forms a single argument in the + form.
This is implicit in
a + b ** 5
according to a precedence rule between the and + operator, which is hidden in the parser's implementation and in documentation thereof.
Well, the white-spacing
a + b**5
suggests it. But the suggestions produced by insignificant whitespace can be mere wishful thinking:
int* x, y; // two C pointers? not!
Speaking of whitespace, also have the advantage of there being multiple ways to split the expression into multiple lines, all conforming to a very clear, simple formatting rule:
(+ a
(* 4 (- x y))
(expt b 5))
(+ a
(* 4
(- x y))
(expt b 5))
Fully expanded, every term on separate line:
(+ a
(* 4
(- x
y))
(expt b
5))
In this manner, we can write complex expressions that would be quite unreadable in infix, requiring break-up into intermediate temporaries.
We almost have a circuit diagram now with "gates" for the operations: a three input + gate, etc:
____
/ |- a
| | ____
--| + |-----/ |- 4
| | | * | ____
\____|- | |-----/ |- x
` \____| | - |
| \____|- y
| _____
`--/ |- b
| expt|
\_____|- 5
This is implicit in
according to a precedence rule between the and + operator, which is hidden in the parser's implementation and in documentation thereof.Well, the white-spacing
suggests it. But the suggestions produced by insignificant whitespace can be mere wishful thinking: Speaking of whitespace, also have the advantage of there being multiple ways to split the expression into multiple lines, all conforming to a very clear, simple formatting rule: Fully expanded, every term on separate line: In this manner, we can write complex expressions that would be quite unreadable in infix, requiring break-up into intermediate temporaries.We almost have a circuit diagram now with "gates" for the operations: a three input + gate, etc: