[New-bugs-announce] [issue43815] documentation for types.new_class() mention misleading default for exec_body

Eric V. Smith report at bugs.python.org
Mon Apr 12 10:23:27 EDT 2021


New submission from Eric V. Smith <eric at trueblade.com>:

https://github.com/python/cpython/blob/3.8/Lib/types.py

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".

----------
assignee: docs at python
components: Documentation
keywords: easy, newcomer friendly
messages: 390854
nosy: docs at python, eric.smith
priority: normal
severity: normal
status: open
title: documentation for types.new_class() mention misleading default for exec_body
versions: Python 3.10, Python 3.8, Python 3.9

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue43815>
_______________________________________


More information about the New-bugs-announce mailing list