New submission from Eric V. Smith <e...@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@python
components: Documentation
keywords: easy, newcomer friendly
messages: 390854
nosy: docs@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue43815>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to