This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

classification
Title: [Good first-time issue] Recommend keyword-only param for memoization in FAQ
Type: Stage: resolved
Components: Documentation Versions: Python 3.8, Python 3.7, Python 3.6
process
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: Mariatta, codecamelot, docs@python, miss-islington, zach.ware
Priority: normal Keywords: easy, patch

Created on 2018-06-11 15:59 by zach.ware, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 7687 merged noah.haasis, 2018-06-14 03:12
PR 7742 merged miss-islington, 2018-06-16 03:30
PR 7743 merged miss-islington, 2018-06-16 03:31
Messages (7)
msg319310 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2018-06-11 15:59
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!
msg319437 - (view) Author: Jason (codecamelot) Date: 2018-06-13 09:02
Hey Zach,

Can I get this one? I haven't contributed anything yet.


Cheers,
Jason
msg319464 - (view) Author: Zachary Ware (zach.ware) * (Python committer) Date: 2018-06-13 13:30
Certainly!  Have a look at the devguide to get started.
msg319702 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2018-06-16 03:29
New changeset 2707e41a5c7ede30349cc7dbd66f8be564965d7c by Mariatta (Noah Haasis) in branch 'master':
bpo-33836: Recommend keyword-only param for memoization in FAQ (GH-7687)
https://github.com/python/cpython/commit/2707e41a5c7ede30349cc7dbd66f8be564965d7c
msg319704 - (view) Author: Mariatta (Mariatta) * (Python committer) Date: 2018-06-16 03:34
Thanks!
msg319706 - (view) Author: miss-islington (miss-islington) Date: 2018-06-16 03:46
New changeset 5a0bf74d4ec11a246b401896cbfb2e840c13da40 by Miss Islington (bot) in branch '3.7':
bpo-33836: Recommend keyword-only param for memoization in FAQ (GH-7687)
https://github.com/python/cpython/commit/5a0bf74d4ec11a246b401896cbfb2e840c13da40
msg319709 - (view) Author: miss-islington (miss-islington) Date: 2018-06-16 03:50
New changeset 2636833e8e9cb16ba3ae7bf776bbfc91f176367c by Miss Islington (bot) in branch '3.6':
bpo-33836: Recommend keyword-only param for memoization in FAQ (GH-7687)
https://github.com/python/cpython/commit/2636833e8e9cb16ba3ae7bf776bbfc91f176367c
History
Date User Action Args
2022-04-11 14:59:01adminsetgithub: 78017
2018-06-16 03:50:30miss-islingtonsetmessages: + msg319709
2018-06-16 03:46:32miss-islingtonsetnosy: + miss-islington
messages: + msg319706
2018-06-16 03:34:23Mariattasetstatus: open -> closed
resolution: fixed
messages: + msg319704

stage: patch review -> resolved
2018-06-16 03:31:20miss-islingtonsetpull_requests: + pull_request7351
2018-06-16 03:30:29miss-islingtonsetpull_requests: + pull_request7350
2018-06-16 03:29:14Mariattasetnosy: + Mariatta
messages: + msg319702
2018-06-14 03:12:52noah.haasissetkeywords: + patch
stage: needs patch -> patch review
pull_requests: + pull_request7300
2018-06-13 13:30:13zach.waresetmessages: + msg319464
2018-06-13 09:02:06codecamelotsetnosy: + codecamelot
messages: + msg319437
2018-06-11 15:59:35zach.warecreate