default_arguments_in_python_are_evaluated_only_once
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
default_arguments_in_python_are_evaluated_only_once [2021/08/15 00:38] – ↷ Page name changed from default_arguments_are_evaluated_only_once_in_python to default_arguments_in_python_are_evaluated_only_once raju | default_arguments_in_python_are_evaluated_only_once [2021/08/15 00:38] (current) – raju | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===== Default arguments are evaluated only once in Python | + | ===== Default arguments |
Python’s default arguments are evaluated //once// when the function is defined, not each time the function is called. Consider for example | Python’s default arguments are evaluated //once// when the function is defined, not each time the function is called. Consider for example | ||
< | < |
default_arguments_in_python_are_evaluated_only_once.1628987925.txt.gz · Last modified: 2021/08/15 00:38 by raju