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.

Title: documentation for types.new_class() mention misleading default for exec_body
Type: Stage: resolved
Components: Documentation Versions: Python 3.10, Python 3.9, Python 3.8
Status: closed Resolution: fixed
Dependencies: Superseder:
Assigned To: docs@python Nosy List: docs@python, eric.smith, miss-islington, shreyneil
Priority: normal Keywords: easy, newcomer friendly, patch

Created on 2021-04-12 14:23 by eric.smith, last changed 2022-04-11 14:59 by admin. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 25779 merged shreyneil, 2021-05-01 12:09
PR 25789 merged miss-islington, 2021-05-01 18:26
PR 25788 merged miss-islington, 2021-05-01 19:55
Messages (2)
msg390854 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-04-12 14:23

The documentation says "If no callback is provided, it has the same effect as passing in lambda ns: ns."

I read this as saying that the callback should return the namespace, but in reality the return value is ignored. I think the lambda should be "lambda ns: None".
msg392624 - (view) Author: Eric V. Smith (eric.smith) * (Python committer) Date: 2021-05-01 19:56
Thanks, shreyneil!
Date User Action Args
2022-04-11 14:59:44adminsetgithub: 87981
2021-05-01 19:56:22eric.smithsetstatus: open -> closed
resolution: fixed
messages: + msg392624

stage: patch review -> resolved
2021-05-01 19:55:25miss-islingtonsetpull_requests: + pull_request24481
2021-05-01 18:26:21miss-islingtonsetnosy: + miss-islington
pull_requests: + pull_request24478
2021-05-01 12:09:48shreyneilsetkeywords: + patch
nosy: + shreyneil

pull_requests: + pull_request24470
stage: patch review
2021-04-12 14:23:27eric.smithcreate