Lines Matching refs:initialization
131 which export an initialization function), or compiled-in modules
132 (where the initialization function is added using :c:func:`PyImport_AppendInittab`).
135 The initialization function can either pass a module definition instance
137 or request "multi-phase initialization" by returning the definition struct itself.
174 initialization.
185 An array of slot definitions for multi-phase initialization, terminated by
187 When using single-phase initialization, *m_slots* must be ``NULL``.
241 Single-phase initialization
244 The module initialization function may create and return the module object
245 directly. This is referred to as "single-phase initialization", and uses one
266 Before it is returned from in the initialization function, the resulting module
269 .. _multi-phase-initialization: argument
271 Multi-phase initialization
274 An alternate way to specify extensions is to request "multi-phase initialization".
276 initialization is split between the *creation phase*, when the module object
281 Unlike modules created using single-phase initialization, these modules are not
291 All modules created using multi-phase initialization are expected to support
295 To request multi-phase initialization, the initialization function
372 See :PEP:`489` for more details on multi-phase initialization.
378 initialization. They can be used directly, for example when creating module
435 The module initialization function (if using single phase initialization) or
437 initialization), can use the following functions to help initialize the module
443 be used from the module's initialization function. This steals a reference to
464 used from the module's initialization function. Return ``-1`` on error, ``0`` on
471 used from the module's initialization function. The string *value* must be
501 Single-phase initialization creates singleton modules that can be looked up
505 These functions will not work on modules created using multi-phase initialization,
520 Only effective on modules created using single-phase initialization.
523 so it is unnecessary (but harmless) to call it from module initialization