mirror of
https://github.com/python/cpython.git
synced 2025-08-03 16:39:00 +00:00
Issue #3080: Add PyModule_NewObject() function
This commit is contained in:
parent
3a9559b844
commit
0639b56672
3 changed files with 28 additions and 8 deletions
|
@ -29,7 +29,7 @@ There are only a few functions special to module objects.
|
|||
:c:data:`PyModule_Type`.
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyModule_New(const char *name)
|
||||
.. c:function:: PyObject* PyModule_NewObject(PyObject *name)
|
||||
|
||||
.. index::
|
||||
single: __name__ (module attribute)
|
||||
|
@ -40,6 +40,14 @@ There are only a few functions special to module objects.
|
|||
Only the module's :attr:`__doc__` and :attr:`__name__` attributes are filled in;
|
||||
the caller is responsible for providing a :attr:`__file__` attribute.
|
||||
|
||||
.. versionadded:: 3.3
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyModule_New(const char *name)
|
||||
|
||||
Similar to :c:func:`PyImport_NewObject`, but the name is an UTF-8 encoded
|
||||
string instead of a Unicode object.
|
||||
|
||||
|
||||
.. c:function:: PyObject* PyModule_GetDict(PyObject *module)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue