• Home
  • Raw
  • Download

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``.
217 Single-phase initialization
220 The module initialization function may create and return the module object
221 directly. This is referred to as "single-phase initialization", and uses one
242 Before it is returned from in the initialization function, the resulting module
245 .. _multi-phase-initialization: argument
247 Multi-phase initialization
250 An alternate way to specify extensions is to request "multi-phase initialization".
252 initialization is split between the *creation phase*, when the module object
257 Unlike modules created using single-phase initialization, these modules are not
267 All modules created using multi-phase initialization are expected to support
271 To request multi-phase initialization, the initialization function
348 See :PEP:`489` for more details on multi-phase initialization.
354 initialization. They can be used directly, for example when creating module
411 The module initialization function (if using single phase initialization) or
413 initialization), can use the following functions to help initialize the module
419 be used from the module's initialization function. This steals a reference to
440 used from the module's initialization function. Return ``-1`` on error, ``0`` on
447 used from the module's initialization function. The string *value* must be
467 Single-phase initialization creates singleton modules that can be looked up
471 These functions will not work on modules created using multi-phase initialization,
486 Only effective on modules created using single-phase initialization.
489 so it is unnecessary (but harmless) to call it from module initialization