New submission from Zachary Ware <zachary.w...@gmail.com>:

In 
https://docs.python.org/3/faq/programming.html#why-are-default-values-shared-between-objects
 there is an example showing memoization using `def expensive(arg1, arg2, 
_cache={}):`.  We should change the signature in that example to make `_cache` 
a keyword-only parameter and possibly adjust the comment to note that that's 
been done to prevent accidental calls with three positional arguments.



Note to existing contributors: if this wouldn't be within your first couple of 
patches, please leave this for a new contributor to find.  Thanks!

----------
assignee: docs@python
components: Documentation
keywords: easy
messages: 319310
nosy: docs@python, zach.ware
priority: normal
severity: normal
stage: needs patch
status: open
title: [Good first-time issue] Recommend keyword-only param for memoization in 
FAQ
versions: Python 3.6, Python 3.7, Python 3.8

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue33836>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to