aboutsummaryrefslogtreecommitdiff
path: root/research
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2019-05-14 19:44:04 -0300
committerSilvio Rhatto <rhatto@riseup.net>2019-05-14 19:44:04 -0300
commit9a07e364c59226addcca09203ba8ba218151af8f (patch)
tree82d22da20b136153dc3417e334fb6c3accac9f4d /research
parent6007bb17a1918535d8dc9384c7d8f24dfbfcddb2 (diff)
downloadblog-9a07e364c59226addcca09203ba8ba218151af8f.tar.gz
blog-9a07e364c59226addcca09203ba8ba218151af8f.tar.bz2
Research: Python: handling mutables as arguments and as default arguments
Diffstat (limited to 'research')
-rw-r--r--research/python.md4
1 files changed, 4 insertions, 0 deletions
diff --git a/research/python.md b/research/python.md
index 40e0db5..71f27ef 100644
--- a/research/python.md
+++ b/research/python.md
@@ -97,6 +97,10 @@ Python encourages polymorphism:
So remember that when [copying](https://stackoverflow.com/questions/2612802/how-to-clone-or-copy-a-list#2612815)
or referencing a list.
+Also, [take care with handling mutables as arguments and as default arguments](http://www.thedigitalcatonline.com/blog/2015/02/11/default-arguments-in-python/),
+also explained [here](https://docs.python.org/3/tutorial/controlflow.html#default-argument-values) and [here](https://docs.python-guide.org/writing/gotchas/)
+(common gotchas).
+
### Threads
From [GlobalInterpreterLock](https://wiki.python.org/moin/GlobalInterpreterLock):