chunk_id stringlengths 36 36 | source stringclasses 35
values | source_url stringlengths 0 290 | upstream_license stringclasses 1
value | document_id stringlengths 36 36 | chunk_index int64 0 324k | retrieved_at stringclasses 2
values | chunker_version stringclasses 4
values | content_hash stringlengths 15 64 | content stringlengths 50 44.7k | namespace stringclasses 9
values | source_name stringclasses 35
values | raw_text stringlengths 50 44.7k | cleaned_text stringlengths 50 44.7k | tags stringclasses 49
values | collection_name stringclasses 11
values |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
7a984c6d-ef59-4979-9307-bd8e9bab5e53 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,253 | supabase-export-v2 | 11bc034d994dc246 | whether the invalid value is caught by Python or the underlying C libraries). The earliest date for which it can generate a time is platform-dependent.
.. function:: monotonic() -> float | trusted_official_docs | CPython Docs | whether the invalid value is caught by Python or the underlying C libraries). The earliest date for which it can generate a time is platform-dependent.
.. function:: monotonic() -> float | whether the invalid value is caught by Python or the underlying C libraries). The earliest date for which it can generate a time is platform-dependent.
.. function:: monotonic() -> float | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7b469b31-d079-40ce-bde6-75f4d8614efc | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,205 | supabase-export-v2 | b9ccae3f878f8fc7 | 1993'``. The day field is two characters long and is space padded if the day is a single digit, e.g.: ``'Wed Jun 9 04:26:40 1993'``.
If *t* is not provided, the current time as returned by :func:`localtime`
is used. Locale information is not used by :func:`asctime`. | trusted_official_docs | CPython Docs | 1993'``. The day field is two characters long and is space padded if the day is a single digit, e.g.: ``'Wed Jun 9 04:26:40 1993'``.
If *t* is not provided, the current time as returned by :func:`localtime`
is used. Locale information is not used by :func:`asctime`. | 1993'``. The day field is two characters long and is space padded if the day is a single digit, e.g.: ``'Wed Jun 9 04:26:40 1993'``.
If *t* is not provided, the current time as returned by :func:`localtime`
is used. Locale information is not used by :func:`asctime`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7c316ff7-af5c-42c2-8219-9c5c26161977 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,305 | supabase-export-v2 | 7cffef822accc533 | name. | | +-----------+------------------------------------------------+-------+ | ``%b`` | Locale's abbreviated month name. | | | | | | +-----------+------------------------------------------------+-------+ | ``%B`` | Locale's full month name.
| |
+-----------+------------------------------------------------+-------+... | trusted_official_docs | CPython Docs | name. | | +-----------+------------------------------------------------+-------+ | ``%b`` | Locale's abbreviated month name. | | | | | | +-----------+------------------------------------------------+-------+ | ``%B`` | Locale's full month name.
| |
+-----------+------------------------------------------------+-------+... | name. | | +-----------+------------------------------------------------+-------+ | ``%b`` | Locale's abbreviated month name. | | | | | | +-----------+------------------------------------------------+-------+ | ``%B`` | Locale's full month name.
| |
+-----------+------------------------------------------------+-------+... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
7de36297-a524-4c94-9af6-8ee3185dbc7d | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,179 | supabase-export-v2 | cddfb8e1c911f0ee | This module provides various time-related functions. For related functionality, see also the :mod:`datetime` and :mod:`calendar` modules.
Although this module is always available,
not all functions are available on all platforms. Most of the functions
defined in this module call platform C library functions with the sa... | trusted_official_docs | CPython Docs | This module provides various time-related functions. For related functionality, see also the :mod:`datetime` and :mod:`calendar` modules.
Although this module is always available,
not all functions are available on all platforms. Most of the functions
defined in this module call platform C library functions with the sa... | This module provides various time-related functions. For related functionality, see also the :mod:`datetime` and :mod:`calendar` modules.
Although this module is always available,
not all functions are available on all platforms. Most of the functions
defined in this module call platform C library functions with the sa... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8152cd3b-9f76-4b6a-8302-4b5afbb9ce3a | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,364 | supabase-export-v2 | f12c76b01c191743 | reference point of the returned value is undefined, so that only the difference between the results of two calls in the same thread is valid.
Use :func:`thread_time_ns` to avoid the precision loss caused by the
:class:`float` type. | trusted_official_docs | CPython Docs | reference point of the returned value is undefined, so that only the difference between the results of two calls in the same thread is valid.
Use :func:`thread_time_ns` to avoid the precision loss caused by the
:class:`float` type. | reference point of the returned value is undefined, so that only the difference between the results of two calls in the same thread is valid.
Use :func:`thread_time_ns` to avoid the precision loss caused by the
:class:`float` type. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
841c2000-c46e-4298-a943-37997b976ca8 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,252 | supabase-export-v2 | 93fc67d801e8164a | .. function:: mktime(t)
This is the inverse function of :func:`localtime`. Its argument is the
:class:`struct_time` or full 9-tuple (since the dst flag is needed; use ``-1``
as the dst flag if it is unknown) which expresses the time in *local* time, not
UTC. It returns a floating-point number, for compatibility with... | trusted_official_docs | CPython Docs | .. function:: mktime(t)
This is the inverse function of :func:`localtime`. Its argument is the
:class:`struct_time` or full 9-tuple (since the dst flag is needed; use ``-1``
as the dst flag if it is unknown) which expresses the time in *local* time, not
UTC. It returns a floating-point number, for compatibility with... | .. function:: mktime(t)
This is the inverse function of :func:`localtime`. Its argument is the
:class:`struct_time` or full 9-tuple (since the dst flag is needed; use ``-1``
as the dst flag if it is unknown) which expresses the time in *local* time, not
UTC. It returns a floating-point number, for compatibility with... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
85d632a7-e975-4205-8fef-e2431876e3d8 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,240 | supabase-export-v2 | 8626944ca8567c12 | Get information on the specified clock as a namespace object. Supported clock names and the corresponding functions to read their value are:
* ``'monotonic'``: :func:`time.monotonic`
* ``'perf_counter'``: :func:`time.perf_counter`
* ``'process_time'``: :func:`time.process_time`
* ``'thread_time'``: :func:`time.threa... | trusted_official_docs | CPython Docs | Get information on the specified clock as a namespace object. Supported clock names and the corresponding functions to read their value are:
* ``'monotonic'``: :func:`time.monotonic`
* ``'perf_counter'``: :func:`time.perf_counter`
* ``'process_time'``: :func:`time.process_time`
* ``'thread_time'``: :func:`time.threa... | Get information on the specified clock as a namespace object. Supported clock names and the corresponding functions to read their value are:
* ``'monotonic'``: :func:`time.monotonic`
* ``'perf_counter'``: :func:`time.perf_counter`
* ``'process_time'``: :func:`time.process_time`
* ``'thread_time'``: :func:`time.threa... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
85f93c14-3e4e-485b-852c-46eaceb0191b | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,279 | supabase-export-v2 | db02d7ac3002ddfa | process-wide by definition. The reference point of the returned value is undefined, so that only the difference between the results of two calls is valid.
Use :func:`process_time_ns` to avoid the precision loss caused by the
:class:`float` type. | trusted_official_docs | CPython Docs | process-wide by definition. The reference point of the returned value is undefined, so that only the difference between the results of two calls is valid.
Use :func:`process_time_ns` to avoid the precision loss caused by the
:class:`float` type. | process-wide by definition. The reference point of the returned value is undefined, so that only the difference between the results of two calls is valid.
Use :func:`process_time_ns` to avoid the precision loss caused by the
:class:`float` type. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
8651326b-39e0-4e1b-9c5d-f4ccd7b3258f | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,444 | supabase-export-v2 | f113322e31a79c48 | .. data:: tzname
A tuple of two strings: the first is the name of the local non-DST timezone, the
second is the name of the local DST timezone. If no DST timezone is defined,
the second string should not be used. See note below. | trusted_official_docs | CPython Docs | .. data:: tzname
A tuple of two strings: the first is the name of the local non-DST timezone, the
second is the name of the local DST timezone. If no DST timezone is defined,
the second string should not be used. See note below. | .. data:: tzname
A tuple of two strings: the first is the name of the local non-DST timezone, the
second is the name of the local DST timezone. If no DST timezone is defined,
the second string should not be used. See note below. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
86625eea-4e92-41a7-8444-fc378a83b39c | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,248 | supabase-export-v2 | fbd0926152655ba7 | .. function:: localtime([secs])
Like :func:`gmtime` but converts to local time. If *secs* is not provided or
:const:`None`, the current time as returned by :func:`.time` is used. The dst
flag is set to ``1`` when DST applies to the given time. | trusted_official_docs | CPython Docs | .. function:: localtime([secs])
Like :func:`gmtime` but converts to local time. If *secs* is not provided or
:const:`None`, the current time as returned by :func:`.time` is used. The dst
flag is set to ``1`` when DST applies to the given time. | .. function:: localtime([secs])
Like :func:`gmtime` but converts to local time. If *secs* is not provided or
:const:`None`, the current time as returned by :func:`.time` is used. The dst
flag is set to ``1`` when DST applies to the given time. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
911af69d-befa-407c-a38a-378671b18653 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,450 | supabase-export-v2 | 6fa98b467c2b9d28 | Module :mod:`locale` Internationalization services. The locale setting affects the interpretation of many format specifiers in :func:`strftime` and :func:`strptime`.
Module :mod:`calendar`
General calendar-related functions. :func:`~calendar.timegm` is the
inverse of :func:`gmtime` from this module. | trusted_official_docs | CPython Docs | Module :mod:`locale` Internationalization services. The locale setting affects the interpretation of many format specifiers in :func:`strftime` and :func:`strptime`.
Module :mod:`calendar`
General calendar-related functions. :func:`~calendar.timegm` is the
inverse of :func:`gmtime` from this module. | Module :mod:`locale` Internationalization services. The locale setting affects the interpretation of many format specifiers in :func:`strftime` and :func:`strptime`.
Module :mod:`calendar`
General calendar-related functions. :func:`~calendar.timegm` is the
inverse of :func:`gmtime` from this module. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
91f50cb8-b030-42e1-a10d-3c97d88ac821 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,235 | supabase-export-v2 | 9fad48738b3033a1 | .. function:: ctime([secs])
Convert a time expressed in seconds since the epoch_ to a string of a form:
``'Sun Jun 20 23:21:05 1993'`` representing local time. The day field
is two characters long and is space padded if the day is a single digit,
e.g.: ``'Wed Jun 9 04:26:40 1993'``. | trusted_official_docs | CPython Docs | .. function:: ctime([secs])
Convert a time expressed in seconds since the epoch_ to a string of a form:
``'Sun Jun 20 23:21:05 1993'`` representing local time. The day field
is two characters long and is space padded if the day is a single digit,
e.g.: ``'Wed Jun 9 04:26:40 1993'``. | .. function:: ctime([secs])
Convert a time expressed in seconds since the epoch_ to a string of a form:
``'Sun Jun 20 23:21:05 1993'`` representing local time. The day field
is two characters long and is space padded if the day is a single digit,
e.g.: ``'Wed Jun 9 04:26:40 1993'``. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
93a1b827-3271-42b5-9ba0-6e13cb45b702 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,318 | supabase-export-v2 | cecbee2a90727b1c | (3) The range really is ``0`` to ``61``; value ``60`` is valid in timestamps representing `leap seconds`_ and value ``61`` is supported for historical reasons.
(4)
When used with the :func:`strptime` function, ``%U`` and ``%W`` are only used in
calculations when the day of the week and the year are specified. | trusted_official_docs | CPython Docs | (3) The range really is ``0`` to ``61``; value ``60`` is valid in timestamps representing `leap seconds`_ and value ``61`` is supported for historical reasons.
(4)
When used with the :func:`strptime` function, ``%U`` and ``%W`` are only used in
calculations when the day of the week and the year are specified. | (3) The range really is ``0`` to ``61``; value ``60`` is valid in timestamps representing `leap seconds`_ and value ``61`` is supported for historical reasons.
(4)
When used with the :func:`strptime` function, ``%U`` and ``%W`` are only used in
calculations when the day of the week and the year are specified. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
99e8e4e8-39ca-4e59-930d-b8764408507b | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,395 | supabase-export-v2 | 4c862adb53ba2de9 | suspend-aware monotonic clock without having to deal with the complications of :data:`CLOCK_REALTIME`, which may have discontinuities if the time is changed using ``settimeofday()`` or similar.
.. availability:: Linux >= 2.6.39. | trusted_official_docs | CPython Docs | suspend-aware monotonic clock without having to deal with the complications of :data:`CLOCK_REALTIME`, which may have discontinuities if the time is changed using ``settimeofday()`` or similar.
.. availability:: Linux >= 2.6.39. | suspend-aware monotonic clock without having to deal with the complications of :data:`CLOCK_REALTIME`, which may have discontinuities if the time is changed using ``settimeofday()`` or similar.
.. availability:: Linux >= 2.6.39. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9a4eed43-3c70-401a-a3a3-6005e9bab838 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,452 | supabase-export-v2 | c6c48fd08638719f | .. rubric:: Footnotes
.. [1] The use of ``%Z`` is now deprecated, but the ``%z`` escape that expands to the
preferred hour/minute offset is not supported by all ANSI C libraries. Also, a
strict reading of the original 1982 :rfc:`822` standard calls for a two-digit
year (``%y`` rather than ``%Y``), but practice moved... | trusted_official_docs | CPython Docs | .. rubric:: Footnotes
.. [1] The use of ``%Z`` is now deprecated, but the ``%z`` escape that expands to the
preferred hour/minute offset is not supported by all ANSI C libraries. Also, a
strict reading of the original 1982 :rfc:`822` standard calls for a two-digit
year (``%y`` rather than ``%Y``), but practice moved... | .. rubric:: Footnotes
.. [1] The use of ``%Z`` is now deprecated, but the ``%z`` escape that expands to the
preferred hour/minute offset is not supported by all ANSI C libraries. Also, a
strict reading of the original 1982 :rfc:`822` standard calls for a two-digit
year (``%y`` rather than ``%Y``), but practice moved... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9a5cc4f1-4e68-41fe-a17e-58e24a6e44f3 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,286 | supabase-export-v2 | 230bdc645f9584f1 | If the sleep is interrupted by a signal and no exception is raised by the signal handler, the sleep is restarted with a recomputed timeout.
The suspension time may be longer than requested by an arbitrary amount,
because of the scheduling of other activity in the system. | trusted_official_docs | CPython Docs | If the sleep is interrupted by a signal and no exception is raised by the signal handler, the sleep is restarted with a recomputed timeout.
The suspension time may be longer than requested by an arbitrary amount,
because of the scheduling of other activity in the system. | If the sleep is interrupted by a signal and no exception is raised by the signal handler, the sleep is restarted with a recomputed timeout.
The suspension time may be longer than requested by an arbitrary amount,
because of the scheduling of other activity in the system. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9b291808-5f7b-4842-8ba9-d1bc6be578e2 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,442 | supabase-export-v2 | 11f9522a31edc6fd | .. data:: timezone
The offset of the local (non-DST) timezone, in seconds west of UTC (negative in
most of Western Europe, positive in the US, zero in the UK). See note below. | trusted_official_docs | CPython Docs | .. data:: timezone
The offset of the local (non-DST) timezone, in seconds west of UTC (negative in
most of Western Europe, positive in the US, zero in the UK). See note below. | .. data:: timezone
The offset of the local (non-DST) timezone, in seconds west of UTC (negative in
most of Western Europe, positive in the US, zero in the UK). See note below. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9b41208a-0a90-459c-a0c1-d69c149ddaa5 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,326 | supabase-export-v2 | 9dee5d83519b63f7 | Parse a string representing a time according to a format. The return value is a :class:`struct_time` as returned by :func:`gmtime` or :func:`localtime`.
The *format* parameter uses the same directives as those used by
:func:`strftime`; it defaults to ``"%a %b %d %H:%M:%S %Y"`` which matches the
formatting returned by... | trusted_official_docs | CPython Docs | Parse a string representing a time according to a format. The return value is a :class:`struct_time` as returned by :func:`gmtime` or :func:`localtime`.
The *format* parameter uses the same directives as those used by
:func:`strftime`; it defaults to ``"%a %b %d %H:%M:%S %Y"`` which matches the
formatting returned by... | Parse a string representing a time according to a format. The return value is a :class:`struct_time` as returned by :func:`gmtime` or :func:`localtime`.
The *format* parameter uses the same directives as those used by
:func:`strftime`; it defaults to ``"%a %b %d %H:%M:%S %Y"`` which matches the
formatting returned by... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9b6d875a-384d-4e3c-af1d-be0451d7903f | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,308 | supabase-export-v2 | 30ffd0d41acd143d | | | | | All days in a new year preceding the first | | | | Sunday are considered to be in week 0.
| |
| | | |
| | | |
| | | |
+-----------+------------------------------------------------+-------+
| ``%u`` | Day of the week (Monday is 1; Sunday is 7) | |
| | as a decimal number [1, 7]. | |
+-----------+---------... | trusted_official_docs | CPython Docs | | | | | All days in a new year preceding the first | | | | Sunday are considered to be in week 0.
| |
| | | |
| | | |
| | | |
+-----------+------------------------------------------------+-------+
| ``%u`` | Day of the week (Monday is 1; Sunday is 7) | |
| | as a decimal number [1, 7]. | |
+-----------+---------... | | | | | All days in a new year preceding the first | | | | Sunday are considered to be in week 0.
| |
| | | |
| | | |
| | | |
+-----------+------------------------------------------------+-------+
| ``%u`` | Day of the week (Monday is 1; Sunday is 7) | |
| | as a decimal number [1, 7]. | |
+-----------+---------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9ec461ab-8978-402c-963e-f8c3eced52c1 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,257 | supabase-export-v2 | 9c87d53846f7ade2 | call ``QueryPerformanceCounter()`` and ``QueryPerformanceFrequency()``. * On macOS, call ``mach_absolute_time()`` and ``mach_timebase_info()``. * On HP-UX, call ``gethrtime()``. * Call ``clock_gettime(CLOCK_HIGHRES)`` if available. * Otherwise, call ``clock_gettime(CLOCK_MONOTONIC)``.
Use :func:`monotonic_ns` to avoid ... | trusted_official_docs | CPython Docs | call ``QueryPerformanceCounter()`` and ``QueryPerformanceFrequency()``. * On macOS, call ``mach_absolute_time()`` and ``mach_timebase_info()``. * On HP-UX, call ``gethrtime()``. * Call ``clock_gettime(CLOCK_HIGHRES)`` if available. * Otherwise, call ``clock_gettime(CLOCK_MONOTONIC)``.
Use :func:`monotonic_ns` to avoid ... | call ``QueryPerformanceCounter()`` and ``QueryPerformanceFrequency()``. * On macOS, call ``mach_absolute_time()`` and ``mach_timebase_info()``. * On HP-UX, call ``gethrtime()``. * Call ``clock_gettime(CLOCK_HIGHRES)`` if available. * Otherwise, call ``clock_gettime(CLOCK_MONOTONIC)``.
Use :func:`monotonic_ns` to avoid ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
9fd3396d-80ec-40ba-a2a3-30ca50e96280 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,188 | supabase-export-v2 | d7895b8f6fa2156c | or far in the future. The cut-off point in the future is determined by the C library; for 32-bit systems, it is typically in 2038.
.. index::
single: 2-digit years | trusted_official_docs | CPython Docs | or far in the future. The cut-off point in the future is determined by the C library; for 32-bit systems, it is typically in 2038.
.. index::
single: 2-digit years | or far in the future. The cut-off point in the future is determined by the C library; for 32-bit systems, it is typically in 2038.
.. index::
single: 2-digit years | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a1fb0ed2-1245-4746-9782-6b91475bc459 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,341 | supabase-export-v2 | 32e37158a10b6989 | * - 5 - .. attribute:: tm_sec - range [0, 61]; see :ref:`Note (2) <leap-second>` in :func:`strftime`
* - 6
- .. attribute:: tm_wday
- range [0, 6]; Monday is 0 | trusted_official_docs | CPython Docs | * - 5 - .. attribute:: tm_sec - range [0, 61]; see :ref:`Note (2) <leap-second>` in :func:`strftime`
* - 6
- .. attribute:: tm_wday
- range [0, 6]; Monday is 0 | * - 5 - .. attribute:: tm_sec - range [0, 61]; see :ref:`Note (2) <leap-second>` in :func:`strftime`
* - 6
- .. attribute:: tm_wday
- range [0, 6]; Monday is 0 | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a3d30e31-dc45-423b-972b-e7ae75ba6fbf | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,306 | supabase-export-v2 | 2fb3ca857575d312 | | | [000000,999999]. | | | | | | +-----------+------------------------------------------------+-------+ | ``%H`` | Hour (24-hour clock) as a decimal number | | | | [00,23].
| |
+-----------+------------------------------------------------+-------+
| ``%I`` | Hour (12-hour clock) as a decimal number | |
| | [01,12]. ... | trusted_official_docs | CPython Docs | | | [000000,999999]. | | | | | | +-----------+------------------------------------------------+-------+ | ``%H`` | Hour (24-hour clock) as a decimal number | | | | [00,23].
| |
+-----------+------------------------------------------------+-------+
| ``%I`` | Hour (12-hour clock) as a decimal number | |
| | [01,12]. ... | | | [000000,999999]. | | | | | | +-----------+------------------------------------------------+-------+ | ``%H`` | Hour (24-hour clock) as a decimal number | | | | [00,23].
| |
+-----------+------------------------------------------------+-------+
| ``%I`` | Hour (12-hour clock) as a decimal number | |
| | [01,12]. ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
a7b7cfbe-99a5-432a-bba1-4f7a52748ffc | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,196 | supabase-export-v2 | 8f15af6bb93262de | the units in which their value or argument is expressed. E.g. on most Unix systems, the clock "ticks" only 50 or 100 times a second.
* On the other hand, the precision of :func:`.time` and :func:`sleep` is better
than their Unix equivalents: times are expressed as floating-point numbers,
:func:`.time` returns the mos... | trusted_official_docs | CPython Docs | the units in which their value or argument is expressed. E.g. on most Unix systems, the clock "ticks" only 50 or 100 times a second.
* On the other hand, the precision of :func:`.time` and :func:`sleep` is better
than their Unix equivalents: times are expressed as floating-point numbers,
:func:`.time` returns the mos... | the units in which their value or argument is expressed. E.g. on most Unix systems, the clock "ticks" only 50 or 100 times a second.
* On the other hand, the precision of :func:`.time` and :func:`sleep` is better
than their Unix equivalents: times are expressed as floating-point numbers,
:func:`.time` returns the mos... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ab885d4b-ff6f-45ca-adb5-8fbc13e3db94 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,446 | supabase-export-v2 | e0c976d5e02fcf5f | .. note::
For the above Timezone constants (:data:`altzone`, :data:`daylight`, :data:`timezone`,
and :data:`tzname`), the value is determined by the timezone rules in effect
at module load time or the last time :func:`tzset` is called and may be incorrect
for times in the past. It is recommended to use the :attr:`~s... | trusted_official_docs | CPython Docs | .. note::
For the above Timezone constants (:data:`altzone`, :data:`daylight`, :data:`timezone`,
and :data:`tzname`), the value is determined by the timezone rules in effect
at module load time or the last time :func:`tzset` is called and may be incorrect
for times in the past. It is recommended to use the :attr:`~s... | .. note::
For the above Timezone constants (:data:`altzone`, :data:`daylight`, :data:`timezone`,
and :data:`tzname`), the value is determined by the timezone rules in effect
at module load time or the last time :func:`tzset` is called and may be incorrect
for times in the past. It is recommended to use the :attr:`~s... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
adc6b653-e28b-4419-b618-1e84fa94ce4b | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,254 | supabase-export-v2 | c1252e76500c8276 | .. function:: monotonic() -> float
Return the value (in fractional seconds) of a monotonic clock, i.e. a clock
that cannot go backwards. The clock is not affected by system clock updates. The reference point of the returned value is undefined, so that only the
difference between the results of two calls is valid. | trusted_official_docs | CPython Docs | .. function:: monotonic() -> float
Return the value (in fractional seconds) of a monotonic clock, i.e. a clock
that cannot go backwards. The clock is not affected by system clock updates. The reference point of the returned value is undefined, so that only the
difference between the results of two calls is valid. | .. function:: monotonic() -> float
Return the value (in fractional seconds) of a monotonic clock, i.e. a clock
that cannot go backwards. The clock is not affected by system clock updates. The reference point of the returned value is undefined, so that only the
difference between the results of two calls is valid. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
af474fec-eda3-48c2-bfe2-f639415e3448 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,301 | supabase-export-v2 | ed9a770d0ce0d5a2 | .. function:: strftime(format[, t])
Convert a tuple or :class:`struct_time` representing a time as returned by
:func:`gmtime` or :func:`localtime` to a string as specified by the *format*
argument. If *t* is not provided, the current time as returned by
:func:`localtime` is used. *format* must be a string. :exc:`Val... | trusted_official_docs | CPython Docs | .. function:: strftime(format[, t])
Convert a tuple or :class:`struct_time` representing a time as returned by
:func:`gmtime` or :func:`localtime` to a string as specified by the *format*
argument. If *t* is not provided, the current time as returned by
:func:`localtime` is used. *format* must be a string. :exc:`Val... | .. function:: strftime(format[, t])
Convert a tuple or :class:`struct_time` representing a time as returned by
:func:`gmtime` or :func:`localtime` to a string as specified by the *format*
argument. If *t* is not provided, the current time as returned by
:func:`localtime` is used. *format* must be a string. :exc:`Val... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
afcbe06d-22de-4bb3-baaf-8d387e789c57 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,242 | supabase-export-v2 | 60fd2434038ef8c8 | The result has the following attributes:
- *adjustable*: ``True`` if the clock can be set to jump forward or backward
in time, ``False`` otherwise. Does not refer to gradual NTP rate adjustments. - *implementation*: The name of the underlying C function used to get
the clock value. Refer to :ref:`time-clock-id-consta... | trusted_official_docs | CPython Docs | The result has the following attributes:
- *adjustable*: ``True`` if the clock can be set to jump forward or backward
in time, ``False`` otherwise. Does not refer to gradual NTP rate adjustments. - *implementation*: The name of the underlying C function used to get
the clock value. Refer to :ref:`time-clock-id-consta... | The result has the following attributes:
- *adjustable*: ``True`` if the clock can be set to jump forward or backward
in time, ``False`` otherwise. Does not refer to gradual NTP rate adjustments. - *implementation*: The name of the underlying C function used to get
the clock value. Refer to :ref:`time-clock-id-consta... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b8064f0e-0051-492d-ab21-629e8fa641f0 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,382 | supabase-export-v2 | 0fe42dda684b807f | (1 <= *n* <= 365). Leap days are not counted, so in all years February 28 is day 59 and March 1 is day 60.
:samp:`{n}`
The zero-based Julian day (0 <= *n* <= 365). Leap days are counted, and
it is possible to refer to February 29. | trusted_official_docs | CPython Docs | (1 <= *n* <= 365). Leap days are not counted, so in all years February 28 is day 59 and March 1 is day 60.
:samp:`{n}`
The zero-based Julian day (0 <= *n* <= 365). Leap days are counted, and
it is possible to refer to February 29. | (1 <= *n* <= 365). Leap days are not counted, so in all years February 28 is day 59 and March 1 is day 60.
:samp:`{n}`
The zero-based Julian day (0 <= *n* <= 365). Leap days are counted, and
it is possible to refer to February 29. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
b8a7878f-963c-411c-ab2a-51ea54048f77 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,303 | supabase-export-v2 | 774adbae7c6b33a1 | 0 is a legal argument for any position in the time tuple; if it is normally illegal the value is forced to a correct one.
The following directives can be embedded in the *format* string. They are shown
without the optional field width and precision specification, and are replaced
by the indicated characters in the :f... | trusted_official_docs | CPython Docs | 0 is a legal argument for any position in the time tuple; if it is normally illegal the value is forced to a correct one.
The following directives can be embedded in the *format* string. They are shown
without the optional field width and precision specification, and are replaced
by the indicated characters in the :f... | 0 is a legal argument for any position in the time tuple; if it is normally illegal the value is forced to a correct one.
The following directives can be embedded in the *format* string. They are shown
without the optional field width and precision specification, and are replaced
by the indicated characters in the :f... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bb2e2293-cfa4-4c59-b15e-a2f1e7a1970c | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,347 | supabase-export-v2 | 4ee7ac9323d39b96 | Note that unlike the C structure, the month value is a range of [1, 12], not [0, 11].
In calls to :func:`mktime`, :attr:`tm_isdst` may be set to 1 when daylight
savings time is in effect, and 0 when it is not. A value of -1 indicates that
this is not known, and will usually result in the correct state being filled in... | trusted_official_docs | CPython Docs | Note that unlike the C structure, the month value is a range of [1, 12], not [0, 11].
In calls to :func:`mktime`, :attr:`tm_isdst` may be set to 1 when daylight
savings time is in effect, and 0 when it is not. A value of -1 indicates that
this is not known, and will usually result in the correct state being filled in... | Note that unlike the C structure, the month value is a range of [1, 12], not [0, 11].
In calls to :func:`mktime`, :attr:`tm_isdst` may be set to 1 when daylight
savings time is in effect, and 0 when it is not. A value of -1 indicates that
this is not known, and will usually result in the correct state being filled in... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
bca0e2e6-4c5e-457b-9b1d-1a90411bdc05 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,199 | supabase-export-v2 | 4120e758d5a5eef8 | See :class:`struct_time` for a description of these objects.
.. versionchanged:: 3.3
The :class:`struct_time` type was extended to provide
the :attr:`~struct_time.tm_gmtoff` and :attr:`~struct_time.tm_zone`
attributes when platform supports corresponding
``struct tm`` members. | trusted_official_docs | CPython Docs | See :class:`struct_time` for a description of these objects.
.. versionchanged:: 3.3
The :class:`struct_time` type was extended to provide
the :attr:`~struct_time.tm_gmtoff` and :attr:`~struct_time.tm_zone`
attributes when platform supports corresponding
``struct tm`` members. | See :class:`struct_time` for a description of these objects.
.. versionchanged:: 3.3
The :class:`struct_time` type was extended to provide
the :attr:`~struct_time.tm_gmtoff` and :attr:`~struct_time.tm_zone`
attributes when platform supports corresponding
``struct tm`` members. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c00b5593-76b9-4b59-93b4-a4000562b054 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,186 | supabase-export-v2 | ed731267aec0f079 | to the total number of elapsed seconds since the epoch, typically excluding `leap seconds`_. Leap seconds are excluded from this total on all POSIX-compliant platforms.
.. index:: single: Year 2038 | trusted_official_docs | CPython Docs | to the total number of elapsed seconds since the epoch, typically excluding `leap seconds`_. Leap seconds are excluded from this total on all POSIX-compliant platforms.
.. index:: single: Year 2038 | to the total number of elapsed seconds since the epoch, typically excluding `leap seconds`_. Leap seconds are excluded from this total on all POSIX-compliant platforms.
.. index:: single: Year 2038 | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c59a5dd8-81f8-426a-aea7-279b95089cca | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,204 | supabase-export-v2 | 12b87830b9e8462a | .. function:: asctime([t])
Convert a tuple or :class:`struct_time` representing a time as returned by
:func:`gmtime` or :func:`localtime` to a string of the following
form: ``'Sun Jun 20 23:21:05 1993'``. The day field is two characters long
and is space padded if the day is a single digit,
e.g.: ``'Wed Jun 9 04:26... | trusted_official_docs | CPython Docs | .. function:: asctime([t])
Convert a tuple or :class:`struct_time` representing a time as returned by
:func:`gmtime` or :func:`localtime` to a string of the following
form: ``'Sun Jun 20 23:21:05 1993'``. The day field is two characters long
and is space padded if the day is a single digit,
e.g.: ``'Wed Jun 9 04:26... | .. function:: asctime([t])
Convert a tuple or :class:`struct_time` representing a time as returned by
:func:`gmtime` or :func:`localtime` to a string of the following
form: ``'Sun Jun 20 23:21:05 1993'``. The day field is two characters long
and is space padded if the day is a single digit,
e.g.: ``'Wed Jun 9 04:26... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
c90d26e3-4bd1-47da-9950-415d60236b2f | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,309 | supabase-export-v2 | 226a60797cb233ef | ``%W`` | Week number of the year (Monday as the first | \(4) | | | day of the week) as a decimal number [00,53].
| |
| | All days in a new year preceding the first | |
| | Monday are considered to be in week 0. | |
| | | |
| | | |
| | | |
+-----------+------------------------------------------------+-------+
| `... | trusted_official_docs | CPython Docs | ``%W`` | Week number of the year (Monday as the first | \(4) | | | day of the week) as a decimal number [00,53].
| |
| | All days in a new year preceding the first | |
| | Monday are considered to be in week 0. | |
| | | |
| | | |
| | | |
+-----------+------------------------------------------------+-------+
| `... | ``%W`` | Week number of the year (Monday as the first | \(4) | | | day of the week) as a decimal number [00,53].
| |
| | All days in a new year preceding the first | |
| | Monday are considered to be in week 0. | |
| | | |
| | | |
| | | |
+-----------+------------------------------------------------+-------+
| `... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
cc271140-de40-48bc-8b85-fc154846658a | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,202 | supabase-export-v2 | ab2c8beabf105955 | * Use the following functions to convert between time representations:
+-------------------------+-------------------------+-------------------------+
| From | To | Use |
+=========================+=========================+=========================+
| seconds since the epoch | :class:`struct_time` in | :func:`gmtim... | trusted_official_docs | CPython Docs | * Use the following functions to convert between time representations:
+-------------------------+-------------------------+-------------------------+
| From | To | Use |
+=========================+=========================+=========================+
| seconds since the epoch | :class:`struct_time` in | :func:`gmtim... | * Use the following functions to convert between time representations:
+-------------------------+-------------------------+-------------------------+
| From | To | Use |
+=========================+=========================+=========================+
| seconds since the epoch | :class:`struct_time` in | :func:`gmtim... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d717cf4b-e8fe-49b7-8ffb-75377a80d12e | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,269 | supabase-export-v2 | 217832837fefca29 | On CPython, use the same clock as :func:`time.monotonic` and is a monotonic clock, i.e. a clock that cannot go backwards.
Use :func:`perf_counter_ns` to avoid the precision loss caused by the
:class:`float` type. | trusted_official_docs | CPython Docs | On CPython, use the same clock as :func:`time.monotonic` and is a monotonic clock, i.e. a clock that cannot go backwards.
Use :func:`perf_counter_ns` to avoid the precision loss caused by the
:class:`float` type. | On CPython, use the same clock as :func:`time.monotonic` and is a monotonic clock, i.e. a clock that cannot go backwards.
Use :func:`perf_counter_ns` to avoid the precision loss caused by the
:class:`float` type. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d82925e0-fe6d-4975-b59d-28ec73d0c043 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,311 | supabase-export-v2 | dd11e6dd74226de7 | form +HHMM or -HHMM, where H represents decimal| | | | hour digits and M represents decimal minute | | | | digits [-23:59, +23:59].
[1]_ | |
+-----------+------------------------------------------------+-------+
| ``%Z`` | Time zone name (no characters if no time zone | |
| | exists). Deprecated. [1]_ | |
+--------... | trusted_official_docs | CPython Docs | form +HHMM or -HHMM, where H represents decimal| | | | hour digits and M represents decimal minute | | | | digits [-23:59, +23:59].
[1]_ | |
+-----------+------------------------------------------------+-------+
| ``%Z`` | Time zone name (no characters if no time zone | |
| | exists). Deprecated. [1]_ | |
+--------... | form +HHMM or -HHMM, where H represents decimal| | | | hour digits and M represents decimal minute | | | | digits [-23:59, +23:59].
[1]_ | |
+-----------+------------------------------------------------+-------+
| ``%Z`` | Time zone name (no characters if no time zone | |
| | exists). Deprecated. [1]_ | |
+--------... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
d8eb38e7-4953-4ede-8667-74b270b2b5bd | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,323 | supabase-export-v2 | 9ea7ae239041440e | of a directive in the following order; this is also not portable. The field width is normally 2 except for ``%j`` where it is 3.
.. index::
single: % (percent); datetime format | trusted_official_docs | CPython Docs | of a directive in the following order; this is also not portable. The field width is normally 2 except for ``%j`` where it is 3.
.. index::
single: % (percent); datetime format | of a directive in the following order; this is also not portable. The field width is normally 2 except for ``%j`` where it is 3.
.. index::
single: % (percent); datetime format | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dbc6e8b2-f62e-4ceb-b4f2-dc10bd82836a | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,185 | supabase-export-v2 | f0b04db70a056473 | .. index:: seconds since the epoch
* The term :dfn:`seconds since the epoch` refers to the total number
of elapsed seconds since the epoch, typically excluding
`leap seconds`_. Leap seconds are excluded from this total on all
POSIX-compliant platforms. | trusted_official_docs | CPython Docs | .. index:: seconds since the epoch
* The term :dfn:`seconds since the epoch` refers to the total number
of elapsed seconds since the epoch, typically excluding
`leap seconds`_. Leap seconds are excluded from this total on all
POSIX-compliant platforms. | .. index:: seconds since the epoch
* The term :dfn:`seconds since the epoch` refers to the total number
of elapsed seconds since the epoch, typically excluding
`leap seconds`_. Leap seconds are excluded from this total on all
POSIX-compliant platforms. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
dd2f6620-5c23-4fcf-9806-8067725aa5fe | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,307 | supabase-export-v2 | 4cf5edb46810e1af | | ``%m`` | Month as a decimal number [01,12]. | | | | | | +-----------+------------------------------------------------+-------+ | ``%M`` | Minute as a decimal number [00,59].
| |
| | | |
+-----------+------------------------------------------------+-------+
| ``%p`` | Locale's equivalent of either AM or PM. | \(2) ... | trusted_official_docs | CPython Docs | | ``%m`` | Month as a decimal number [01,12]. | | | | | | +-----------+------------------------------------------------+-------+ | ``%M`` | Minute as a decimal number [00,59].
| |
| | | |
+-----------+------------------------------------------------+-------+
| ``%p`` | Locale's equivalent of either AM or PM. | \(2) ... | | ``%m`` | Month as a decimal number [01,12]. | | | | | | +-----------+------------------------------------------------+-------+ | ``%M`` | Minute as a decimal number [00,59].
| |
| | | |
+-----------+------------------------------------------------+-------+
| ``%p`` | Locale's equivalent of either AM or PM. | \(2) ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
ddca2e2f-db72-45a8-82bd-5995e0768f45 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,211 | supabase-export-v2 | 0249cc4fc6179f61 | Use :func:`threading.get_ident` or the :attr:`~threading.Thread.ident` attribute of :class:`threading.Thread` objects to get a suitable value for *thread_id*.
.. warning::
Passing an invalid or expired *thread_id* may result in
undefined behavior, such as segmentation fault. | trusted_official_docs | CPython Docs | Use :func:`threading.get_ident` or the :attr:`~threading.Thread.ident` attribute of :class:`threading.Thread` objects to get a suitable value for *thread_id*.
.. warning::
Passing an invalid or expired *thread_id* may result in
undefined behavior, such as segmentation fault. | Use :func:`threading.get_ident` or the :attr:`~threading.Thread.ident` attribute of :class:`threading.Thread` objects to get a suitable value for *thread_id*.
.. warning::
Passing an invalid or expired *thread_id* may result in
undefined behavior, such as segmentation fault. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e1d9453a-4a6f-4d0b-b799-547f6d532d10 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,381 | supabase-export-v2 | 001e58984053fab6 | ``start[/time], end[/time]`` Indicates when to change to and back from DST. The format of the start and end dates are one of the following:
:samp:`J{n}`
The Julian day *n* (1 <= *n* <= 365). Leap days are not counted, so in
all years February 28 is day 59 and March 1 is day 60. | trusted_official_docs | CPython Docs | ``start[/time], end[/time]`` Indicates when to change to and back from DST. The format of the start and end dates are one of the following:
:samp:`J{n}`
The Julian day *n* (1 <= *n* <= 365). Leap days are not counted, so in
all years February 28 is day 59 and March 1 is day 60. | ``start[/time], end[/time]`` Indicates when to change to and back from DST. The format of the start and end dates are one of the following:
:samp:`J{n}`
The Julian day *n* (1 <= *n* <= 365). Leap days are not counted, so in
all years February 28 is day 59 and March 1 is day 60. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e361463c-bef6-44e9-9739-20005fa67ba4 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,237 | supabase-export-v2 | 1e5a35d0c616c095 | not provided or :const:`None`, the current time as returned by :func:`.time` is used. ``ctime(secs)`` is equivalent to ``asctime(localtime(secs))``. Locale information is not used by :func:`ctime`.
.. versionchanged:: 3.15
Accepts any real number, not only integer or float. | trusted_official_docs | CPython Docs | not provided or :const:`None`, the current time as returned by :func:`.time` is used. ``ctime(secs)`` is equivalent to ``asctime(localtime(secs))``. Locale information is not used by :func:`ctime`.
.. versionchanged:: 3.15
Accepts any real number, not only integer or float. | not provided or :const:`None`, the current time as returned by :func:`.time` is used. ``ctime(secs)`` is equivalent to ``asctime(localtime(secs))``. Locale information is not used by :func:`ctime`.
.. versionchanged:: 3.15
Accepts any real number, not only integer or float. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e64a4d54-23c3-45a4-b3c8-d6000e425e6b | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,350 | supabase-export-v2 | e814dbc9da5a5f0a | .. function:: time() -> float
Return the time in seconds since the epoch_ as a floating-point
number. The handling of `leap seconds`_ is platform dependent. On Windows and most Unix systems, the leap seconds are not counted towards
the time in seconds since the epoch_. This is commonly referred to as `Unix
time <htt... | trusted_official_docs | CPython Docs | .. function:: time() -> float
Return the time in seconds since the epoch_ as a floating-point
number. The handling of `leap seconds`_ is platform dependent. On Windows and most Unix systems, the leap seconds are not counted towards
the time in seconds since the epoch_. This is commonly referred to as `Unix
time <htt... | .. function:: time() -> float
Return the time in seconds since the epoch_ as a floating-point
number. The handling of `leap seconds`_ is platform dependent. On Windows and most Unix systems, the leap seconds are not counted towards
the time in seconds since the epoch_. This is commonly referred to as `Unix
time <htt... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e7f2885e-318e-4685-bc48-f1d822c072d1 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,304 | supabase-export-v2 | 245a546311bf1ca5 | the *format* string. They are shown without the optional field width and precision specification, and are replaced by the indicated characters in the :func:`strftime` result:
+-----------+------------------------------------------------+-------+
| Directive | Meaning | Notes |
+===========+===========================... | trusted_official_docs | CPython Docs | the *format* string. They are shown without the optional field width and precision specification, and are replaced by the indicated characters in the :func:`strftime` result:
+-----------+------------------------------------------------+-------+
| Directive | Meaning | Notes |
+===========+===========================... | the *format* string. They are shown without the optional field width and precision specification, and are replaced by the indicated characters in the :func:`strftime` result:
+-----------+------------------------------------------------+-------+
| Directive | Meaning | Notes |
+===========+===========================... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
e824f203-d5f0-4672-a674-8dac4dc5d2f2 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,397 | supabase-export-v2 | 9a0f3b749deb06e0 | .. data:: CLOCK_HIGHRES
The Solaris OS has a ``CLOCK_HIGHRES`` timer that attempts to use an optimal
hardware source, and may give close to nanosecond resolution. ``CLOCK_HIGHRES`` is the nonadjustable, high-resolution clock. | trusted_official_docs | CPython Docs | .. data:: CLOCK_HIGHRES
The Solaris OS has a ``CLOCK_HIGHRES`` timer that attempts to use an optimal
hardware source, and may give close to nanosecond resolution. ``CLOCK_HIGHRES`` is the nonadjustable, high-resolution clock. | .. data:: CLOCK_HIGHRES
The Solaris OS has a ``CLOCK_HIGHRES`` timer that attempts to use an optimal
hardware source, and may give close to nanosecond resolution. ``CLOCK_HIGHRES`` is the nonadjustable, high-resolution clock. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
efd87d7b-2c3a-46a4-9301-c19bc8bdbea7 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,236 | supabase-export-v2 | 70a3aee70989729d | time. The day field is two characters long and is space padded if the day is a single digit, e.g.: ``'Wed Jun 9 04:26:40 1993'``.
If *secs* is not provided or :const:`None`, the current time as
returned by :func:`.time` is used. ``ctime(secs)`` is equivalent to
``asctime(localtime(secs))``. Locale information is not ... | trusted_official_docs | CPython Docs | time. The day field is two characters long and is space padded if the day is a single digit, e.g.: ``'Wed Jun 9 04:26:40 1993'``.
If *secs* is not provided or :const:`None`, the current time as
returned by :func:`.time` is used. ``ctime(secs)`` is equivalent to
``asctime(localtime(secs))``. Locale information is not ... | time. The day field is two characters long and is space padded if the day is a single digit, e.g.: ``'Wed Jun 9 04:26:40 1993'``.
If *secs* is not provided or :const:`None`, the current time as
returned by :func:`.time` is used. ``ctime(secs)`` is equivalent to
``asctime(localtime(secs))``. Locale information is not ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f2efb72b-3396-4ecb-a7b6-4cea1d249e2e | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,379 | supabase-export-v2 | f0e3206f104ffa72 | ``std`` and ``dst`` Three or more alphanumerics giving the timezone abbreviations. These will be propagated into time.tzname
``offset``
The offset has the form: ``± hh[:mm[:ss]]``. This indicates the value
added the local time to arrive at UTC. If preceded by a '-', the timezone
is east of the Prime Meridian; otherw... | trusted_official_docs | CPython Docs | ``std`` and ``dst`` Three or more alphanumerics giving the timezone abbreviations. These will be propagated into time.tzname
``offset``
The offset has the form: ``± hh[:mm[:ss]]``. This indicates the value
added the local time to arrive at UTC. If preceded by a '-', the timezone
is east of the Prime Meridian; otherw... | ``std`` and ``dst`` Three or more alphanumerics giving the timezone abbreviations. These will be propagated into time.tzname
``offset``
The offset has the form: ``± hh[:mm[:ss]]``. This indicates the value
added the local time to arrive at UTC. If preceded by a '-', the timezone
is east of the Prime Meridian; otherw... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
f8aacd76-a567-4973-b682-273453a20eeb | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,249 | supabase-export-v2 | 2661d04e70db7152 | or :const:`None`, the current time as returned by :func:`.time` is used. The dst flag is set to ``1`` when DST applies to the given time.
:func:`localtime` may raise :exc:`OverflowError`, if the timestamp is
outside the range of values supported by the platform C :c:func:`localtime`
or :c:func:`gmtime` functions, and... | trusted_official_docs | CPython Docs | or :const:`None`, the current time as returned by :func:`.time` is used. The dst flag is set to ``1`` when DST applies to the given time.
:func:`localtime` may raise :exc:`OverflowError`, if the timestamp is
outside the range of values supported by the platform C :c:func:`localtime`
or :c:func:`gmtime` functions, and... | or :const:`None`, the current time as returned by :func:`.time` is used. The dst flag is set to ``1`` when DST applies to the given time.
:func:`localtime` may raise :exc:`OverflowError`, if the timestamp is
outside the range of values supported by the platform C :c:func:`localtime`
or :c:func:`gmtime` functions, and... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fba65a84-e067-4457-927b-e43ac72d4ae3 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,388 | supabase-export-v2 | 3603d915da1658d5 | required timezone datafile, relative to the root of the systems 'zoneinfo' timezone database, usually located at :file:`/usr/share/zoneinfo`. For example, ``'US/Eastern'``, ``'Australia/Melbourne'``, ``'Egypt'`` or ``'Europe/Amsterdam'``. ::
>>> os.environ['TZ'] = 'US/Eastern'
>>> time.tzset()
>>> time.tzname
('EST'... | trusted_official_docs | CPython Docs | required timezone datafile, relative to the root of the systems 'zoneinfo' timezone database, usually located at :file:`/usr/share/zoneinfo`. For example, ``'US/Eastern'``, ``'Australia/Melbourne'``, ``'Egypt'`` or ``'Europe/Amsterdam'``. ::
>>> os.environ['TZ'] = 'US/Eastern'
>>> time.tzset()
>>> time.tzname
('EST'... | required timezone datafile, relative to the root of the systems 'zoneinfo' timezone database, usually located at :file:`/usr/share/zoneinfo`. For example, ``'US/Eastern'``, ``'Australia/Melbourne'``, ``'Egypt'`` or ``'Europe/Amsterdam'``. ::
>>> os.environ['TZ'] = 'US/Eastern'
>>> time.tzset()
>>> time.tzname
('EST'... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fdb1e44a-73dc-4937-8086-4739cfa648a8 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,266 | supabase-export-v2 | 54189aa25f37a82f | .. index:: single: benchmarking
Return the value (in fractional seconds) of a performance counter, i.e. a
clock with the highest available resolution to measure a short duration. It
does include time elapsed during sleep. The clock is the same for all
processes. The reference
point of the returned value is undefine... | trusted_official_docs | CPython Docs | .. index:: single: benchmarking
Return the value (in fractional seconds) of a performance counter, i.e. a
clock with the highest available resolution to measure a short duration. It
does include time elapsed during sleep. The clock is the same for all
processes. The reference
point of the returned value is undefine... | .. index:: single: benchmarking
Return the value (in fractional seconds) of a performance counter, i.e. a
clock with the highest available resolution to measure a short duration. It
does include time elapsed during sleep. The clock is the same for all
processes. The reference
point of the returned value is undefine... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
fe8eb36c-c0be-4738-a4fc-d30bed6941ed | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,191 | supabase-export-v2 | afca6848f9a1ba10 | .. index:: single: UTC single: Coordinated Universal Time single: Greenwich Mean Time
* UTC is `Coordinated Universal Time`_ and superseded `Greenwich Mean Time`_ or
GMT as the basis of international timekeeping. The acronym UTC is not a
mistake but conforms to an earlier, language-agnostic naming scheme for time
st... | trusted_official_docs | CPython Docs | .. index:: single: UTC single: Coordinated Universal Time single: Greenwich Mean Time
* UTC is `Coordinated Universal Time`_ and superseded `Greenwich Mean Time`_ or
GMT as the basis of international timekeeping. The acronym UTC is not a
mistake but conforms to an earlier, language-agnostic naming scheme for time
st... | .. index:: single: UTC single: Coordinated Universal Time single: Greenwich Mean Time
* UTC is `Coordinated Universal Time`_ and superseded `Greenwich Mean Time`_ or
GMT as the basis of international timekeeping. The acronym UTC is not a
mistake but conforms to an earlier, language-agnostic naming scheme for time
st... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
feb0a839-639d-4253-984d-1e08dad43e32 | CPython Docs | file://datasets/cpython/Doc/library/time.rst | unknown | 84a7f151-afd7-4c62-bc25-17a4dfccdd30 | 44,245 | supabase-export-v2 | fffed36c008cceee | .. function:: gmtime([secs])
Convert a time expressed in seconds since the epoch_ to a :class:`struct_time` in
UTC in which the dst flag is always zero. If *secs* is not provided or
:const:`None`, the current time as returned by :func:`.time` is used. Fractions
of a second are ignored. See above for a description of... | trusted_official_docs | CPython Docs | .. function:: gmtime([secs])
Convert a time expressed in seconds since the epoch_ to a :class:`struct_time` in
UTC in which the dst flag is always zero. If *secs* is not provided or
:const:`None`, the current time as returned by :func:`.time` is used. Fractions
of a second are ignored. See above for a description of... | .. function:: gmtime([secs])
Convert a time expressed in seconds since the epoch_ to a :class:`struct_time` in
UTC in which the dst flag is always zero. If *secs* is not provided or
:const:`None`, the current time as returned by :func:`.time` is used. Fractions
of a second are ignored. See above for a description of... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
00b1a4d9-9197-404f-bc42-8bcf6ec6af4d | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,874 | supabase-export-v2 | c18bc7b9bb8209aa | Importing a source file directly ''''''''''''''''''''''''''''''''
This recipe should be used with caution: it is an approximation of an import
statement where the file path is specified directly, rather than
:data:`sys.path` being searched. Alternatives should first be considered first,
such as modifying :data:`sys.pat... | trusted_official_docs | CPython Docs | Importing a source file directly ''''''''''''''''''''''''''''''''
This recipe should be used with caution: it is an approximation of an import
statement where the file path is specified directly, rather than
:data:`sys.path` being searched. Alternatives should first be considered first,
such as modifying :data:`sys.pat... | Importing a source file directly ''''''''''''''''''''''''''''''''
This recipe should be used with caution: it is an approximation of an import
statement where the file path is specified directly, rather than
:data:`sys.path` being searched. Alternatives should first be considered first,
such as modifying :data:`sys.pat... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
02880d19-b416-4a4a-b089-3c339709690b | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,893 | supabase-export-v2 | 12b163f2ebda3d2d | def import_module(name, package=None): """An approximate implementation of import.""" absolute_name = importlib.util.resolve_name(name, package) try: return sys.modules[absolute_name] except KeyError: pass
path = None
if '.' in absolute_name:
parent_name, _, child_name = absolute_name.rpartition('.')
parent_module =... | trusted_official_docs | CPython Docs | def import_module(name, package=None): """An approximate implementation of import.""" absolute_name = importlib.util.resolve_name(name, package) try: return sys.modules[absolute_name] except KeyError: pass
path = None
if '.' in absolute_name:
parent_name, _, child_name = absolute_name.rpartition('.')
parent_module =... | def import_module(name, package=None): """An approximate implementation of import.""" absolute_name = importlib.util.resolve_name(name, package) try: return sys.modules[absolute_name] except KeyError: pass
path = None
if '.' in absolute_name:
parent_name, _, child_name = absolute_name.rpartition('.')
parent_module =... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
043635c0-b29c-42b6-9042-b7bf06f5dd07 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,525 | supabase-export-v2 | ab42a1ab5f1076e1 | method which, when called, should invalidate any internal cache used by the finder. Used by :func:`importlib.invalidate_caches` when invalidating the caches of all finders on :data:`sys.meta_path`.
.. versionchanged:: 3.4
Returns ``None`` when called instead of :data:`NotImplemented`. | trusted_official_docs | CPython Docs | method which, when called, should invalidate any internal cache used by the finder. Used by :func:`importlib.invalidate_caches` when invalidating the caches of all finders on :data:`sys.meta_path`.
.. versionchanged:: 3.4
Returns ``None`` when called instead of :data:`NotImplemented`. | method which, when called, should invalidate any internal cache used by the finder. Used by :func:`importlib.invalidate_caches` when invalidating the caches of all finders on :data:`sys.meta_path`.
.. versionchanged:: 3.4
Returns ``None`` when called instead of :data:`NotImplemented`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
097de92d-b6ee-4334-b81a-bd76a277f3ac | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,808 | supabase-export-v2 | c06c49d928ef5c12 | ``/foo/bar/__pycache__/baz.cpython-32.pyc`` for Python 3.2. The ``cpython-32`` string comes from the current magic tag (see :func:`get_tag`; if :attr:`sys.implementation.cache_tag` is not defined then :exc:`NotImplementedError` will be raised).
The *optimization* parameter is used to specify the optimization level of t... | trusted_official_docs | CPython Docs | ``/foo/bar/__pycache__/baz.cpython-32.pyc`` for Python 3.2. The ``cpython-32`` string comes from the current magic tag (see :func:`get_tag`; if :attr:`sys.implementation.cache_tag` is not defined then :exc:`NotImplementedError` will be raised).
The *optimization* parameter is used to specify the optimization level of t... | ``/foo/bar/__pycache__/baz.cpython-32.pyc`` for Python 3.2. The ``cpython-32`` string comes from the current magic tag (see :func:`get_tag`; if :attr:`sys.implementation.cache_tag` is not defined then :exc:`NotImplementedError` will be raised).
The *optimization* parameter is used to specify the optimization level of t... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
09bb9870-a761-4b91-b1e2-61deda341b57 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,769 | supabase-export-v2 | 531e932b7b569952 | .. class:: ModuleSpec(name, loader, *, origin=None, loader_state=None, is_package=None)
A specification for a module's import-system-related state. This is
typically exposed as the module's :attr:`~module.__spec__` attribute. Many
of these attributes are also available directly on a module: for example,
``module.__s... | trusted_official_docs | CPython Docs | .. class:: ModuleSpec(name, loader, *, origin=None, loader_state=None, is_package=None)
A specification for a module's import-system-related state. This is
typically exposed as the module's :attr:`~module.__spec__` attribute. Many
of these attributes are also available directly on a module: for example,
``module.__s... | .. class:: ModuleSpec(name, loader, *, origin=None, loader_state=None, is_package=None)
A specification for a module's import-system-related state. This is
typically exposed as the module's :attr:`~module.__spec__` attribute. Many
of these attributes are also available directly on a module: for example,
``module.__s... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0a46851f-5975-41b3-ba03-0a150f2b9310 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,700 | supabase-export-v2 | c649b5440d9d99f4 | for use on :data:`sys.path_hooks`. An instance of :class:`FileFinder` is returned by the closure using the path argument given to the closure directly and *loader_details* indirectly.
If the argument to the closure is not an existing directory,
:exc:`ImportError` is raised. | trusted_official_docs | CPython Docs | for use on :data:`sys.path_hooks`. An instance of :class:`FileFinder` is returned by the closure using the path argument given to the closure directly and *loader_details* indirectly.
If the argument to the closure is not an existing directory,
:exc:`ImportError` is raised. | for use on :data:`sys.path_hooks`. An instance of :class:`FileFinder` is returned by the closure using the path argument given to the closure directly and *loader_details* indirectly.
If the argument to the closure is not an existing directory,
:exc:`ImportError` is raised. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0a581599-6f0f-4d9e-974c-2976d371b074 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,775 | supabase-export-v2 | dadd49dabab42a5d | .. attribute:: origin
The location the :term:`loader` should use to load the module
(see :attr:`module.__file__`). For example, for modules loaded from a ``.py`` file this is the filename. The :term:`finder` should always set this attribute to a meaningful value
for the :term:`loader` to use. In the uncommon case tha... | trusted_official_docs | CPython Docs | .. attribute:: origin
The location the :term:`loader` should use to load the module
(see :attr:`module.__file__`). For example, for modules loaded from a ``.py`` file this is the filename. The :term:`finder` should always set this attribute to a meaningful value
for the :term:`loader` to use. In the uncommon case tha... | .. attribute:: origin
The location the :term:`loader` should use to load the module
(see :attr:`module.__file__`). For example, for modules loaded from a ``.py`` file this is the filename. The :term:`finder` should always set this attribute to a meaningful value
for the :term:`loader` to use. In the uncommon case tha... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
0dc48a54-d5a1-470e-aae7-21108a7778a2 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,579 | supabase-export-v2 | c57f3f9015d3dd20 | to return a true value if the module is a package, a false value otherwise. :exc:`ImportError` is raised if the :term:`loader` cannot find the module.
.. versionchanged:: 3.4
Raises :exc:`ImportError` instead of :exc:`NotImplementedError`. | trusted_official_docs | CPython Docs | to return a true value if the module is a package, a false value otherwise. :exc:`ImportError` is raised if the :term:`loader` cannot find the module.
.. versionchanged:: 3.4
Raises :exc:`ImportError` instead of :exc:`NotImplementedError`. | to return a true value if the module is a package, a false value otherwise. :exc:`ImportError` is raised if the :term:`loader` cannot find the module.
.. versionchanged:: 3.4
Raises :exc:`ImportError` instead of :exc:`NotImplementedError`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
104c6b1c-d135-4b3e-bc23-51ac9f6bfbcf | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,822 | supabase-export-v2 | 5035e5b2cebd619d | Resolve a relative module name to an absolute one.
If **name** has no leading dots, then **name** is simply returned. This
allows for usage such as
``importlib.util.resolve_name('sys', __spec__.parent)`` without doing a
check to see if the **package** argument is needed. | trusted_official_docs | CPython Docs | Resolve a relative module name to an absolute one.
If **name** has no leading dots, then **name** is simply returned. This
allows for usage such as
``importlib.util.resolve_name('sys', __spec__.parent)`` without doing a
check to see if the **package** argument is needed. | Resolve a relative module name to an absolute one.
If **name** has no leading dots, then **name** is simply returned. This
allows for usage such as
``importlib.util.resolve_name('sys', __spec__.parent)`` without doing a
check to see if the **package** argument is needed. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
13330c2d-2348-4e18-93bc-79bf2e72126e | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,887 | supabase-export-v2 | 3b60bc2fc3aae2a7 | # For illustrative purposes only. SpamMetaPathFinder = importlib.machinery.PathFinder SpamPathEntryFinder = importlib.machinery.FileFinder loader_details = (importlib.machinery.SourceFileLoader, importlib.machinery.SOURCE_SUFFIXES)
# Setting up a meta path finder. # Make sure to put the finder in the proper location in... | trusted_official_docs | CPython Docs | # For illustrative purposes only. SpamMetaPathFinder = importlib.machinery.PathFinder SpamPathEntryFinder = importlib.machinery.FileFinder loader_details = (importlib.machinery.SourceFileLoader, importlib.machinery.SOURCE_SUFFIXES)
# Setting up a meta path finder. # Make sure to put the finder in the proper location in... | # For illustrative purposes only. SpamMetaPathFinder = importlib.machinery.PathFinder SpamPathEntryFinder = importlib.machinery.FileFinder loader_details = (importlib.machinery.SourceFileLoader, importlib.machinery.SOURCE_SUFFIXES)
# Setting up a meta path finder. # Make sure to put the finder in the proper location in... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
15fc2108-16ad-49f3-9469-67ab0ca2016b | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,595 | supabase-export-v2 | 7a53e41c341c6478 | code is available, then the method should return the path to the source file, regardless of whether a bytecode was used to load the module.
.. versionchanged:: 3.4
Raises :exc:`ImportError` instead of :exc:`NotImplementedError`. | trusted_official_docs | CPython Docs | code is available, then the method should return the path to the source file, regardless of whether a bytecode was used to load the module.
.. versionchanged:: 3.4
Raises :exc:`ImportError` instead of :exc:`NotImplementedError`. | code is available, then the method should return the path to the source file, regardless of whether a bytecode was used to load the module.
.. versionchanged:: 3.4
Raises :exc:`ImportError` instead of :exc:`NotImplementedError`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
163b9ab8-e9f4-4676-bef6-938a4f4482b8 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,612 | supabase-export-v2 | 3dedfac293e78cd9 | * :meth:`ResourceLoader.get_data` * :meth:`ExecutionLoader.get_filename` Should only return the path to the source file; sourceless loading is not supported.
The abstract methods defined by this class are to add optional bytecode
file support. Not implementing these optional methods (or causing them to
raise :exc:`No... | trusted_official_docs | CPython Docs | * :meth:`ResourceLoader.get_data` * :meth:`ExecutionLoader.get_filename` Should only return the path to the source file; sourceless loading is not supported.
The abstract methods defined by this class are to add optional bytecode
file support. Not implementing these optional methods (or causing them to
raise :exc:`No... | * :meth:`ResourceLoader.get_data` * :meth:`ExecutionLoader.get_filename` Should only return the path to the source file; sourceless loading is not supported.
The abstract methods defined by this class are to add optional bytecode
file support. Not implementing these optional methods (or causing them to
raise :exc:`No... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
194745db-8fbe-4ad1-86c1-5ef108fcb95c | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,576 | supabase-export-v2 | 829d41a7a929ce7f | separators into ``'\n'`` characters. Returns ``None`` if no source is available (e.g. a built-in module). Raises :exc:`ImportError` if the loader cannot find the module specified.
.. versionchanged:: 3.4
Raises :exc:`ImportError` instead of :exc:`NotImplementedError`. | trusted_official_docs | CPython Docs | separators into ``'\n'`` characters. Returns ``None`` if no source is available (e.g. a built-in module). Raises :exc:`ImportError` if the loader cannot find the module specified.
.. versionchanged:: 3.4
Raises :exc:`ImportError` instead of :exc:`NotImplementedError`. | separators into ``'\n'`` characters. Returns ``None`` if no source is available (e.g. a built-in module). Raises :exc:`ImportError` if the loader cannot find the module specified.
.. versionchanged:: 3.4
Raises :exc:`ImportError` instead of :exc:`NotImplementedError`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
19bf834b-bbf7-4ca9-b03d-43a3d73a9d98 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,888 | supabase-export-v2 | aed9bda174956eb6 | up a meta path finder. # Make sure to put the finder in the proper location in the list in terms of # priority. sys.meta_path.append(SpamMetaPathFinder)
# Setting up a path entry finder. # Make sure to put the path hook in the proper location in the list in terms
# of priority. sys.path_hooks.append(SpamPathEntryFinde... | trusted_official_docs | CPython Docs | up a meta path finder. # Make sure to put the finder in the proper location in the list in terms of # priority. sys.meta_path.append(SpamMetaPathFinder)
# Setting up a path entry finder. # Make sure to put the path hook in the proper location in the list in terms
# of priority. sys.path_hooks.append(SpamPathEntryFinde... | up a meta path finder. # Make sure to put the finder in the proper location in the list in terms of # priority. sys.meta_path.append(SpamMetaPathFinder)
# Setting up a path entry finder. # Make sure to put the path hook in the proper location in the list in terms
# of priority. sys.path_hooks.append(SpamPathEntryFinde... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1ded4e00-8642-4720-a1a0-4d358b33562e | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,488 | supabase-export-v2 | 25dade627f752c1e | (e.g., created a Python source file), you may need to call :func:`invalidate_caches` in order for the new module to be noticed by the import system.
If the module cannot be imported, :func:`import_module` will raise
:exc:`ImportError` or an appropriate subclass like
:exc:`ModuleNotFoundError`. | trusted_official_docs | CPython Docs | (e.g., created a Python source file), you may need to call :func:`invalidate_caches` in order for the new module to be noticed by the import system.
If the module cannot be imported, :func:`import_module` will raise
:exc:`ImportError` or an appropriate subclass like
:exc:`ModuleNotFoundError`. | (e.g., created a Python source file), you may need to call :func:`invalidate_caches` in order for the new module to be noticed by the import system.
If the module cannot be imported, :func:`import_module` will raise
:exc:`ImportError` or an appropriate subclass like
:exc:`ModuleNotFoundError`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
1f34a4ef-008f-4850-bf32-b31168b0aaad | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,499 | supabase-export-v2 | 3dcb68379abb51a0 | * As with all other objects in Python the old objects are only reclaimed after their reference counts drop to zero.
* The names in the module namespace are updated to point to any new or
changed objects. | trusted_official_docs | CPython Docs | * As with all other objects in Python the old objects are only reclaimed after their reference counts drop to zero.
* The names in the module namespace are updated to point to any new or
changed objects. | * As with all other objects in Python the old objects are only reclaimed after their reference counts drop to zero.
* The names in the module namespace are updated to point to any new or
changed objects. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
21412f59-f37a-4c4a-b0d3-ef7a4d6439b0 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,861 | supabase-export-v2 | eac52e1dfb73b0fb | that creates a lazy loader. This is meant to be used in situations where the loader is passed by class instead of by instance. ::
suffixes = importlib.machinery.SOURCE_SUFFIXES
loader = importlib.machinery.SourceFileLoader
lazy_loader = importlib.util.LazyLoader.factory(loader)
finder = importlib.machinery.FileFinde... | trusted_official_docs | CPython Docs | that creates a lazy loader. This is meant to be used in situations where the loader is passed by class instead of by instance. ::
suffixes = importlib.machinery.SOURCE_SUFFIXES
loader = importlib.machinery.SourceFileLoader
lazy_loader = importlib.util.LazyLoader.factory(loader)
finder = importlib.machinery.FileFinde... | that creates a lazy loader. This is meant to be used in situations where the loader is passed by class instead of by instance. ::
suffixes = importlib.machinery.SOURCE_SUFFIXES
loader = importlib.machinery.SourceFileLoader
lazy_loader = importlib.util.LazyLoader.factory(loader)
finder = importlib.machinery.FileFinde... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
21f31e16-c406-4523-b547-4cb42339016c | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,838 | supabase-export-v2 | 9e0310d0448a6a43 | .. function:: spec_from_loader(name, loader, *, origin=None, is_package=None)
A factory function for creating a :class:`~importlib.machinery.ModuleSpec`
instance based on a loader. The parameters have the same meaning as they do
for ModuleSpec. The function uses available :term:`loader` APIs, such as
:meth:`InspectL... | trusted_official_docs | CPython Docs | .. function:: spec_from_loader(name, loader, *, origin=None, is_package=None)
A factory function for creating a :class:`~importlib.machinery.ModuleSpec`
instance based on a loader. The parameters have the same meaning as they do
for ModuleSpec. The function uses available :term:`loader` APIs, such as
:meth:`InspectL... | .. function:: spec_from_loader(name, loader, *, origin=None, is_package=None)
A factory function for creating a :class:`~importlib.machinery.ModuleSpec`
instance based on a loader. The parameters have the same meaning as they do
for ModuleSpec. The function uses available :term:`loader` APIs, such as
:meth:`InspectL... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2320072d-388c-4157-a67d-44043593bdeb | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,784 | supabase-export-v2 | e1d18d29b8a60f81 | .. attribute:: parent
(Read-only) The fully qualified name of the package the module is in (or the
empty string for a top-level module). See :attr:`module.__package__`. If the module is a package then this is the same as :attr:`name`. | trusted_official_docs | CPython Docs | .. attribute:: parent
(Read-only) The fully qualified name of the package the module is in (or the
empty string for a top-level module). See :attr:`module.__package__`. If the module is a package then this is the same as :attr:`name`. | .. attribute:: parent
(Read-only) The fully qualified name of the package the module is in (or the
empty string for a top-level module). See :attr:`module.__package__`. If the module is a package then this is the same as :attr:`name`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2332a7fd-8895-4045-81bf-8de77b793de3 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,487 | supabase-export-v2 | 35cc7f01b38790d1 | between these two functions is that :func:`import_module` returns the specified package or module (e.g. ``pkg.mod``), while :func:`__import__` returns the top-level package or module (e.g. ``pkg``).
If you are dynamically importing a module that was created since the
interpreter began execution (e.g., created a Python... | trusted_official_docs | CPython Docs | between these two functions is that :func:`import_module` returns the specified package or module (e.g. ``pkg.mod``), while :func:`__import__` returns the top-level package or module (e.g. ``pkg``).
If you are dynamically importing a module that was created since the
interpreter began execution (e.g., created a Python... | between these two functions is that :func:`import_module` returns the specified package or module (e.g. ``pkg.mod``), while :func:`__import__` returns the top-level package or module (e.g. ``pkg``).
If you are dynamically importing a module that was created since the
interpreter began execution (e.g., created a Python... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
29a42dc0-ba32-488f-82e1-33a53564a78c | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,486 | supabase-export-v2 | 5d9ea39000f03acd | set to the name of the package which is to act as the anchor for resolving the package name (e.g. ``import_module('..mod', 'pkg.subpkg')`` will import ``pkg.mod``).
The :func:`import_module` function acts as a simplifying wrapper around
:func:`importlib.__import__`. This means all semantics of the function are
derive... | trusted_official_docs | CPython Docs | set to the name of the package which is to act as the anchor for resolving the package name (e.g. ``import_module('..mod', 'pkg.subpkg')`` will import ``pkg.mod``).
The :func:`import_module` function acts as a simplifying wrapper around
:func:`importlib.__import__`. This means all semantics of the function are
derive... | set to the name of the package which is to act as the anchor for resolving the package name (e.g. ``import_module('..mod', 'pkg.subpkg')`` will import ``pkg.mod``).
The :func:`import_module` function acts as a simplifying wrapper around
:func:`importlib.__import__`. This means all semantics of the function are
derive... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2c47ad8d-0776-4722-be9f-7be398d20a03 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,524 | supabase-export-v2 | 4839be779c3462d1 | .. method:: invalidate_caches()
An optional method which, when called, should invalidate any internal
cache used by the finder. Used by :func:`importlib.invalidate_caches`
when invalidating the caches of all finders on :data:`sys.meta_path`. | trusted_official_docs | CPython Docs | .. method:: invalidate_caches()
An optional method which, when called, should invalidate any internal
cache used by the finder. Used by :func:`importlib.invalidate_caches`
when invalidating the caches of all finders on :data:`sys.meta_path`. | .. method:: invalidate_caches()
An optional method which, when called, should invalidate any internal
cache used by the finder. Used by :func:`importlib.invalidate_caches`
when invalidating the caches of all finders on :data:`sys.meta_path`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2dbc5c4b-0688-489b-a627-45c7c5f3dd35 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,507 | supabase-export-v2 | b82b65b9119440ec | does not affect the method definitions of the instances --- they continue to use the old class definition. The same is true for derived classes.
.. versionadded:: 3.4
.. versionchanged:: 3.7
:exc:`ModuleNotFoundError` is raised when the module being reloaded lacks
a :class:`~importlib.machinery.ModuleSpec`. | trusted_official_docs | CPython Docs | does not affect the method definitions of the instances --- they continue to use the old class definition. The same is true for derived classes.
.. versionadded:: 3.4
.. versionchanged:: 3.7
:exc:`ModuleNotFoundError` is raised when the module being reloaded lacks
a :class:`~importlib.machinery.ModuleSpec`. | does not affect the method definitions of the instances --- they continue to use the old class definition. The same is true for derived classes.
.. versionadded:: 3.4
.. versionchanged:: 3.7
:exc:`ModuleNotFoundError` is raised when the module being reloaded lacks
a :class:`~importlib.machinery.ModuleSpec`. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
2e2e44d4-a422-4e4b-97a8-a20f7be57009 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,495 | supabase-export-v2 | f8a93c8ab7cf9c4a | .. function:: reload(module)
Reload a previously imported *module*. The argument must be a module object,
so it must have been successfully imported before. This is useful if you
have edited the module source file using an external editor and want to try
out the new version without leaving the Python interpreter. Th... | trusted_official_docs | CPython Docs | .. function:: reload(module)
Reload a previously imported *module*. The argument must be a module object,
so it must have been successfully imported before. This is useful if you
have edited the module source file using an external editor and want to try
out the new version without leaving the Python interpreter. Th... | .. function:: reload(module)
Reload a previously imported *module*. The argument must be a module object,
so it must have been successfully imported before. This is useful if you
have edited the module source file using an external editor and want to try
out the new version without leaving the Python interpreter. Th... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
32980aa4-4848-434c-9435-5c53459fe2f0 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,869 | supabase-export-v2 | 27ff6935f4dfeabe | If you need to find out if a module can be imported without actually doing the import, then you should use :func:`importlib.util.find_spec`.
Note that if ``name`` is a submodule (contains a dot),
:func:`importlib.util.find_spec` will import the parent module. :: | trusted_official_docs | CPython Docs | If you need to find out if a module can be imported without actually doing the import, then you should use :func:`importlib.util.find_spec`.
Note that if ``name`` is a submodule (contains a dot),
:func:`importlib.util.find_spec` will import the parent module. :: | If you need to find out if a module can be imported without actually doing the import, then you should use :func:`importlib.util.find_spec`.
Note that if ``name`` is a submodule (contains a dot),
:func:`importlib.util.find_spec` will import the parent module. :: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
344ae4d1-e8e6-4ba3-90b2-f3b580df49cc | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,841 | supabase-export-v2 | 7bd2ee9b6e206921 | .. function:: spec_from_file_location(name, location, *, loader=None, submodule_search_locations=None)
A factory function for creating a :class:`~importlib.machinery.ModuleSpec`
instance based on the path to a file. Missing information will be filled in
on the spec by making use of loader APIs and by the implication ... | trusted_official_docs | CPython Docs | .. function:: spec_from_file_location(name, location, *, loader=None, submodule_search_locations=None)
A factory function for creating a :class:`~importlib.machinery.ModuleSpec`
instance based on the path to a file. Missing information will be filled in
on the spec by making use of loader APIs and by the implication ... | .. function:: spec_from_file_location(name, location, *, loader=None, submodule_search_locations=None)
A factory function for creating a :class:`~importlib.machinery.ModuleSpec`
instance based on the path to a file. Missing information will be filled in
on the spec by making use of loader APIs and by the implication ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
35a25eae-ed02-4c9b-ae36-b6541c604282 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,872 | supabase-export-v2 | c47939b73c5c260c | # For illustrative purposes. name = 'itertools'
if name in sys.modules:
print(f"{name!r} already in sys.modules")
elif (spec := importlib.util.find_spec(name)) is not None:
# If you chose to perform the actual import ... module = importlib.util.module_from_spec(spec)
sys.modules[name] = module
spec.loader.exec_mod... | trusted_official_docs | CPython Docs | # For illustrative purposes. name = 'itertools'
if name in sys.modules:
print(f"{name!r} already in sys.modules")
elif (spec := importlib.util.find_spec(name)) is not None:
# If you chose to perform the actual import ... module = importlib.util.module_from_spec(spec)
sys.modules[name] = module
spec.loader.exec_mod... | # For illustrative purposes. name = 'itertools'
if name in sys.modules:
print(f"{name!r} already in sys.modules")
elif (spec := importlib.util.find_spec(name)) is not None:
# If you chose to perform the actual import ... module = importlib.util.module_from_spec(spec)
sys.modules[name] = module
spec.loader.exec_mod... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3874cd6e-94bd-4f07-a30e-2e7b3f157590 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,699 | supabase-export-v2 | c845d3280ea62498 | .. classmethod:: path_hook(*loader_details)
A class method which returns a closure for use on :data:`sys.path_hooks`. An instance of :class:`FileFinder` is returned by the closure using the
path argument given to the closure directly and *loader_details*
indirectly. | trusted_official_docs | CPython Docs | .. classmethod:: path_hook(*loader_details)
A class method which returns a closure for use on :data:`sys.path_hooks`. An instance of :class:`FileFinder` is returned by the closure using the
path argument given to the closure directly and *loader_details*
indirectly. | .. classmethod:: path_hook(*loader_details)
A class method which returns a closure for use on :data:`sys.path_hooks`. An instance of :class:`FileFinder` is returned by the closure using the
path argument given to the closure directly and *loader_details*
indirectly. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
39c3c5e9-13dc-4a39-bfe0-efa77fe51efa | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,855 | supabase-export-v2 | a4ab7bb7f51578f4 | A class which postpones the execution of the loader of a module until the module has an attribute accessed.
This class **only** works with loaders that define
:meth:`~importlib.abc.Loader.exec_module` as control over what module type
is used for the module is required. For those same reasons, the loader's
:meth:`~im... | trusted_official_docs | CPython Docs | A class which postpones the execution of the loader of a module until the module has an attribute accessed.
This class **only** works with loaders that define
:meth:`~importlib.abc.Loader.exec_module` as control over what module type
is used for the module is required. For those same reasons, the loader's
:meth:`~im... | A class which postpones the execution of the loader of a module until the module has an attribute accessed.
This class **only** works with loaders that define
:meth:`~importlib.abc.Loader.exec_module` as control over what module type
is used for the module is required. For those same reasons, the loader's
:meth:`~im... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3aa247b7-6803-42a2-b4ab-d6c9e1aa0992 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,882 | supabase-export-v2 | dade5b0c2f18354f | The example below shows how to implement lazy imports::
>>> import importlib.util
>>> import sys
>>> def lazy_import(name):
... spec = importlib.util.find_spec(name)
... loader = importlib.util.LazyLoader(spec.loader)
... spec.loader = loader
... module = importlib.util.module_from_spec(spec)
... sys.modules[nam... | trusted_official_docs | CPython Docs | The example below shows how to implement lazy imports::
>>> import importlib.util
>>> import sys
>>> def lazy_import(name):
... spec = importlib.util.find_spec(name)
... loader = importlib.util.LazyLoader(spec.loader)
... spec.loader = loader
... module = importlib.util.module_from_spec(spec)
... sys.modules[nam... | The example below shows how to implement lazy imports::
>>> import importlib.util
>>> import sys
>>> def lazy_import(name):
... spec = importlib.util.find_spec(name)
... loader = importlib.util.LazyLoader(spec.loader)
... spec.loader = loader
... module = importlib.util.module_from_spec(spec)
... sys.modules[nam... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3bd859e5-61b5-4264-998b-bd17cb7eca1e | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,557 | supabase-export-v2 | fb7b82210adfa83f | .. method:: exec_module(module)
An abstract method that executes the module in its own namespace
when a module is imported or reloaded. The module should already
be initialized when :meth:`exec_module` is called. When this method exists,
:meth:`create_module` must be defined. | trusted_official_docs | CPython Docs | .. method:: exec_module(module)
An abstract method that executes the module in its own namespace
when a module is imported or reloaded. The module should already
be initialized when :meth:`exec_module` is called. When this method exists,
:meth:`create_module` must be defined. | .. method:: exec_module(module)
An abstract method that executes the module in its own namespace
when a module is imported or reloaded. The module should already
be initialized when :meth:`exec_module` is called. When this method exists,
:meth:`create_module` must be defined. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
3c9482d6-73c5-4261-9bb9-1c63e311eb22 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,513 | supabase-export-v2 | 97fbf563aa751741 | --------------
The :mod:`!importlib.abc` module contains all of the core abstract base classes
used by :keyword:`import`. Some subclasses of the core abstract base classes
are also provided to help in implementing the core ABCs. | trusted_official_docs | CPython Docs | --------------
The :mod:`!importlib.abc` module contains all of the core abstract base classes
used by :keyword:`import`. Some subclasses of the core abstract base classes
are also provided to help in implementing the core ABCs. | --------------
The :mod:`!importlib.abc` module contains all of the core abstract base classes
used by :keyword:`import`. Some subclasses of the core abstract base classes
are also provided to help in implementing the core ABCs. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
42e3b927-10ea-4643-89c7-7fcd95927f88 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,661 | supabase-export-v2 | f963079cb6ff3ae4 | .. function:: all_suffixes()
Returns a combined list of strings representing all file suffixes for
modules recognized by the standard import machinery. This is a
helper for code which simply needs to know if a filesystem path
potentially refers to a module without needing any details on the kind
of module (for exam... | trusted_official_docs | CPython Docs | .. function:: all_suffixes()
Returns a combined list of strings representing all file suffixes for
modules recognized by the standard import machinery. This is a
helper for code which simply needs to know if a filesystem path
potentially refers to a module without needing any details on the kind
of module (for exam... | .. function:: all_suffixes()
Returns a combined list of strings representing all file suffixes for
modules recognized by the standard import machinery. This is a
helper for code which simply needs to know if a filesystem path
potentially refers to a module without needing any details on the kind
of module (for exam... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
49673d3b-8f68-44af-9c0c-77001df2b9e5 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,875 | supabase-export-v2 | e516598cd7c08631 | such as modifying :data:`sys.path` when a proper module is required, or using :func:`runpy.run_path` when the global namespace resulting from running a Python file is appropriate.
To import a Python source file directly from a path, use the following recipe:: | trusted_official_docs | CPython Docs | such as modifying :data:`sys.path` when a proper module is required, or using :func:`runpy.run_path` when the global namespace resulting from running a Python file is appropriate.
To import a Python source file directly from a path, use the following recipe:: | such as modifying :data:`sys.path` when a proper module is required, or using :func:`runpy.run_path` when the global namespace resulting from running a Python file is appropriate.
To import a Python source file directly from a path, use the following recipe:: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
49b41c94-cf43-4490-9d30-0b1adb926df2 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,664 | supabase-export-v2 | 8ecf11aa4dd9faa7 | An :term:`importer` for built-in modules. All known built-in modules are listed in :data:`sys.builtin_module_names`. This class implements the :class:`importlib.abc.MetaPathFinder` and :class:`importlib.abc.InspectLoader` ABCs.
Only class methods are defined by this class to alleviate the need for
instantiation. | trusted_official_docs | CPython Docs | An :term:`importer` for built-in modules. All known built-in modules are listed in :data:`sys.builtin_module_names`. This class implements the :class:`importlib.abc.MetaPathFinder` and :class:`importlib.abc.InspectLoader` ABCs.
Only class methods are defined by this class to alleviate the need for
instantiation. | An :term:`importer` for built-in modules. All known built-in modules are listed in :data:`sys.builtin_module_names`. This class implements the :class:`importlib.abc.MetaPathFinder` and :class:`importlib.abc.InspectLoader` ABCs.
Only class methods are defined by this class to alleviate the need for
instantiation. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4a81d591-6ea3-4064-9975-816650c2c0be | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,611 | supabase-export-v2 | 2c7326b00ab79d96 | An abstract base class for implementing source (and optionally bytecode) file loading. The class inherits from both :class:`ResourceLoader` and :class:`ExecutionLoader`, requiring the implementation of:
* :meth:`ResourceLoader.get_data`
* :meth:`ExecutionLoader.get_filename`
Should only return the path to the source ... | trusted_official_docs | CPython Docs | An abstract base class for implementing source (and optionally bytecode) file loading. The class inherits from both :class:`ResourceLoader` and :class:`ExecutionLoader`, requiring the implementation of:
* :meth:`ResourceLoader.get_data`
* :meth:`ExecutionLoader.get_filename`
Should only return the path to the source ... | An abstract base class for implementing source (and optionally bytecode) file loading. The class inherits from both :class:`ResourceLoader` and :class:`ExecutionLoader`, requiring the implementation of:
* :meth:`ResourceLoader.get_data`
* :meth:`ExecutionLoader.get_filename`
Should only return the path to the source ... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4cb5e47d-a323-4745-b9fe-edc2881ecbdc | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,743 | supabase-export-v2 | 74a7524ca60b8f45 | A concrete implementation of :class:`importlib.abc.ExecutionLoader` for extension modules.
The *fullname* argument specifies the name of the module the loader is to
support. The *path* argument is the path to the extension module's file. | trusted_official_docs | CPython Docs | A concrete implementation of :class:`importlib.abc.ExecutionLoader` for extension modules.
The *fullname* argument specifies the name of the module the loader is to
support. The *path* argument is the path to the extension module's file. | A concrete implementation of :class:`importlib.abc.ExecutionLoader` for extension modules.
The *fullname* argument specifies the name of the module the loader is to
support. The *path* argument is the path to the extension module's file. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
4e3550f3-8cc9-4c1c-b842-bdaa0dc27ff0 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,537 | supabase-export-v2 | e3a864673746989a | .. method:: find_spec(fullname, target=None)
An abstract method for finding a :term:`spec <module spec>` for
the specified module. The finder will search for the module only
within the :term:`path entry` to which it is assigned. If a spec
cannot be found, ``None`` is returned. When passed in, ``target``
is a module... | trusted_official_docs | CPython Docs | .. method:: find_spec(fullname, target=None)
An abstract method for finding a :term:`spec <module spec>` for
the specified module. The finder will search for the module only
within the :term:`path entry` to which it is assigned. If a spec
cannot be found, ``None`` is returned. When passed in, ``target``
is a module... | .. method:: find_spec(fullname, target=None)
An abstract method for finding a :term:`spec <module spec>` for
the specified module. The finder will search for the module only
within the :term:`path entry` to which it is assigned. If a spec
cannot be found, ``None`` is returned. When passed in, ``target``
is a module... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
52096ba7-ca55-48d9-9c28-d548715817f3 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,613 | supabase-export-v2 | f1e2eee8df5213c0 | provided. Bytecode files are an optimization to speed up loading by removing the parsing step of Python's compiler, and so no bytecode-specific API is exposed.
.. versionchanged:: 3.15
Removed the ``load_module()`` method. | trusted_official_docs | CPython Docs | provided. Bytecode files are an optimization to speed up loading by removing the parsing step of Python's compiler, and so no bytecode-specific API is exposed.
.. versionchanged:: 3.15
Removed the ``load_module()`` method. | provided. Bytecode files are an optimization to speed up loading by removing the parsing step of Python's compiler, and so no bytecode-specific API is exposed.
.. versionchanged:: 3.15
Removed the ``load_module()`` method. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
53bfa827-f90f-4136-bd48-0a702e372206 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,793 | supabase-export-v2 | d840247bb1548047 | a module as an anchor for file system traversal. However, the spec origin will reference the location of the *actual* binary in the ``.framework`` folder.
The Xcode project building the app is responsible for converting any ``.so``
files from wherever they exist in the ``PYTHONPATH`` into frameworks in the
``Framewor... | trusted_official_docs | CPython Docs | a module as an anchor for file system traversal. However, the spec origin will reference the location of the *actual* binary in the ``.framework`` folder.
The Xcode project building the app is responsible for converting any ``.so``
files from wherever they exist in the ``PYTHONPATH`` into frameworks in the
``Framewor... | a module as an anchor for file system traversal. However, the spec origin will reference the location of the *actual* binary in the ``.framework`` folder.
The Xcode project building the app is responsible for converting any ``.so``
files from wherever they exist in the ``PYTHONPATH`` into frameworks in the
``Framewor... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
56c4485b-4042-4ec5-bca0-1fe6bf0bcfef | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,782 | supabase-export-v2 | 1281c773e2e7b0d2 | .. attribute:: cached
The filename of a compiled version of the module's code. The :term:`finder` should always set this attribute but it may be ``None``
for modules that do not need compiled code stored. | trusted_official_docs | CPython Docs | .. attribute:: cached
The filename of a compiled version of the module's code. The :term:`finder` should always set this attribute but it may be ``None``
for modules that do not need compiled code stored. | .. attribute:: cached
The filename of a compiled version of the module's code. The :term:`finder` should always set this attribute but it may be ``None``
for modules that do not need compiled code stored. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
59958276-fc87-4eba-980f-159059097c20 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,504 | supabase-export-v2 | 1bf0b7df0652fc36 | try: cache except NameError: cache = {}
It is generally not very useful to reload built-in or dynamically loaded
modules. Reloading :mod:`sys`, :mod:`__main__`, :mod:`builtins` and other
key modules is not recommended. In many cases extension modules are not
designed to be initialized more than once, and may fail in... | trusted_official_docs | CPython Docs | try: cache except NameError: cache = {}
It is generally not very useful to reload built-in or dynamically loaded
modules. Reloading :mod:`sys`, :mod:`__main__`, :mod:`builtins` and other
key modules is not recommended. In many cases extension modules are not
designed to be initialized more than once, and may fail in... | try: cache except NameError: cache = {}
It is generally not very useful to reload built-in or dynamically loaded
modules. Reloading :mod:`sys`, :mod:`__main__`, :mod:`builtins` and other
key modules is not recommended. In many cases extension modules are not
designed to be initialized more than once, and may fail in... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5b5edc01-d876-41d8-b15d-f41b374e50b6 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,575 | supabase-export-v2 | dcebf974ec001b8c | .. method:: get_source(fullname) :abstractmethod:
An abstract method to return the source of a module. It is returned as
a text string using :term:`universal newlines`, translating all
recognized line separators into ``'\n'`` characters. Returns ``None``
if no source is available (e.g. a built-in module). Raises
:e... | trusted_official_docs | CPython Docs | .. method:: get_source(fullname) :abstractmethod:
An abstract method to return the source of a module. It is returned as
a text string using :term:`universal newlines`, translating all
recognized line separators into ``'\n'`` characters. Returns ``None``
if no source is available (e.g. a built-in module). Raises
:e... | .. method:: get_source(fullname) :abstractmethod:
An abstract method to return the source of a module. It is returned as
a text string using :term:`universal newlines`, translating all
recognized line separators into ``'\n'`` characters. Returns ``None``
if no source is available (e.g. a built-in module). Raises
:e... | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5baa559d-7cdf-410e-882c-debf3ca4e158 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,626 | supabase-export-v2 | 7516c81c28e3e7b7 | Optional abstract method which writes the specified bytes to a file path. Any intermediate directories which do not exist are to be created automatically.
When writing to the path fails because the path is read-only
(:const:`errno.EACCES`/:exc:`PermissionError`), do not propagate the
exception. | trusted_official_docs | CPython Docs | Optional abstract method which writes the specified bytes to a file path. Any intermediate directories which do not exist are to be created automatically.
When writing to the path fails because the path is read-only
(:const:`errno.EACCES`/:exc:`PermissionError`), do not propagate the
exception. | Optional abstract method which writes the specified bytes to a file path. Any intermediate directories which do not exist are to be created automatically.
When writing to the path fails because the path is read-only
(:const:`errno.EACCES`/:exc:`PermissionError`), do not propagate the
exception. | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5d3254ca-5217-4d21-bc73-7b13aa81b63a | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,461 | supabase-export-v2 | 66ad81d12935c1f8 | in this package, making it easier for users to create their own custom objects (known generically as an :term:`importer`) to participate in the import process.
Three, the package contains modules exposing additional functionality for
managing aspects of Python packages: | trusted_official_docs | CPython Docs | in this package, making it easier for users to create their own custom objects (known generically as an :term:`importer`) to participate in the import process.
Three, the package contains modules exposing additional functionality for
managing aspects of Python packages: | in this package, making it easier for users to create their own custom objects (known generically as an :term:`importer`) to participate in the import process.
Three, the package contains modules exposing additional functionality for
managing aspects of Python packages: | python, official-docs, cpython, P0 | Local_Trusted_Corpus | |
5d4b8229-4034-4e28-bd85-09e53f454b65 | CPython Docs | file://datasets/cpython/Doc/library/importlib.rst | unknown | f83cfbc1-0213-43ec-b88d-5f8624addc5c | 44,521 | supabase-export-v2 | 89f14f1e0000842b | .. method:: find_spec(fullname, path, target=None)
An abstract method for finding a :term:`spec <module spec>` for
the specified module. If this is a top-level import, *path* will
be ``None``. Otherwise, this is a search for a subpackage or
module and *path* will be the value of :attr:`~module.__path__` from the
pa... | trusted_official_docs | CPython Docs | .. method:: find_spec(fullname, path, target=None)
An abstract method for finding a :term:`spec <module spec>` for
the specified module. If this is a top-level import, *path* will
be ``None``. Otherwise, this is a search for a subpackage or
module and *path* will be the value of :attr:`~module.__path__` from the
pa... | .. method:: find_spec(fullname, path, target=None)
An abstract method for finding a :term:`spec <module spec>` for
the specified module. If this is a top-level import, *path* will
be ``None``. Otherwise, this is a search for a subpackage or
module and *path* will be the value of :attr:`~module.__path__` from the
pa... | python, official-docs, cpython, P0 | Local_Trusted_Corpus |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.