New submission from Eric V. Smith eric@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 report@bugs.python.org https://bugs.python.org/issue43815 _______________________________________
Change by Shreyash Sharma shreyneil@yahoo.co.in:
---------- keywords: +patch nosy: +shreyneil nosy_count: 2.0 -> 3.0 pull_requests: +24470 stage: -> patch review pull_request: https://github.com/python/cpython/pull/25779
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue43815 _______________________________________
Change by miss-islington mariatta.wijaya+miss-islington@gmail.com:
---------- nosy: +miss-islington nosy_count: 3.0 -> 4.0 pull_requests: +24478 pull_request: https://github.com/python/cpython/pull/25789
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue43815 _______________________________________
Change by miss-islington mariatta.wijaya+miss-islington@gmail.com:
---------- pull_requests: +24481 pull_request: https://github.com/python/cpython/pull/25788
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue43815 _______________________________________
Eric V. Smith eric@trueblade.com added the comment:
Thanks, shreyneil!
---------- resolution: -> fixed stage: patch review -> resolved status: open -> closed
_______________________________________ Python tracker report@bugs.python.org https://bugs.python.org/issue43815 _______________________________________