#python #scip
Pure functions are restricted in that they cannot have side effects or change
behavior over time.
If you want to change selection, open document below and click on "Move attachment"
1.2 Elements of Programmingthis expression produces this peculiar output.
Be careful with print ! The fact that it returns None means that it
should not be the expression in an assignment statement.
>>> two = print(2)
2
>>> print(two)
None
<span>Pure functions are restricted in that they cannot have side effects or change
behavior over time. Imposing these restrictions yields substantial benefits.
First, pure functions can be composed more reliably into compound call
expressions. We can see in the non-pure function example Summary
status | not read | | reprioritisations | |
---|
last reprioritisation on | | | suggested re-reading day | |
---|
started reading on | | | finished reading on | |
---|
Details