Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-45482 Add PySimpleNamespace_New() function #28970

Closed
wants to merge 2 commits into from
Closed

bpo-45482 Add PySimpleNamespace_New() function #28970

wants to merge 2 commits into from

Commits on Oct 15, 2021

  1. bpo-45482 Add PySimpleNamespace_New() function

    Add a new PySimpleNamespace_New() function to create a simple
    namespace: C API of the types.SimpleNamespace type.
    
    * Move Include/namespaceobject.h to Include/cpython/namespaceobject.h.
    * Rename _PyNamespace_New() to PySimpleNamespace_New()
    * Rename _PyNamespace_Type to _PySimpleNamespace_Type
    * PySimpleNamespace_New() now calls the ns_dict.update(attrs) method,
      rather than calling PyDict_Update(ns_dict, attrs), to raise more
      accurate exceptions if the argument has the wrong type or format.
    * Add _testcapimodule.PySimpleNamespace_New().
    * Add test_types.SimpleNamespaceTests.test_capi().
    vstinner committed Oct 15, 2021
    Configuration menu
    Copy the full SHA
    5c7e23c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    c5722cf View commit details
    Browse the repository at this point in the history