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
aa8ed4bf-0412-4045-b0cd-adf2c8c2710b
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,023
supabase-export-v2
4b220d7ddd7ece3d
For the *names* parameter, please see the description of the translation object's :meth:`~NullTranslations.install` method. As seen below, you usually mark the strings in your application that are candidates for translation, by wrapping them in a call to the :func:`!_` function, like this::
trusted_official_docs
CPython Docs
For the *names* parameter, please see the description of the translation object's :meth:`~NullTranslations.install` method. As seen below, you usually mark the strings in your application that are candidates for translation, by wrapping them in a call to the :func:`!_` function, like this::
For the *names* parameter, please see the description of the translation object's :meth:`~NullTranslations.install` method. As seen below, you usually mark the strings in your application that are candidates for translation, by wrapping them in a call to the :func:`!_` function, like this::
python, official-docs, cpython, P0
Local_Trusted_Corpus
ab251b9d-320e-4c62-9026-b554e58c323a
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
24,997
supabase-export-v2
7ece517bffd0a4e4
the resulting message (some languages have more than two plural forms). If no translation is found, return *singular* if *n* is 1; return *plural* otherwise. The Plural formula is taken from the catalog header. It is a C or Python expression that has a free variable *n*; the expression evaluates to the index of the p...
trusted_official_docs
CPython Docs
the resulting message (some languages have more than two plural forms). If no translation is found, return *singular* if *n* is 1; return *plural* otherwise. The Plural formula is taken from the catalog header. It is a C or Python expression that has a free variable *n*; the expression evaluates to the index of the p...
the resulting message (some languages have more than two plural forms). If no translation is found, return *singular* if *n* is 1; return *plural* otherwise. The Plural formula is taken from the catalog header. It is a C or Python expression that has a free variable *n*; the expression evaluates to the index of the p...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ad7b68d7-20ef-4845-9d35-efaf8fd0fd2d
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,098
supabase-export-v2
c09e370adb07b3a1
They are structured human-readable files that contain every marked string in the source code, along with a placeholder for the translated versions of these strings. Copies of these :file:`.po` files are then handed over to the individual human translators who write translations for every supported natural language. The...
trusted_official_docs
CPython Docs
They are structured human-readable files that contain every marked string in the source code, along with a placeholder for the translated versions of these strings. Copies of these :file:`.po` files are then handed over to the individual human translators who write translations for every supported natural language. The...
They are structured human-readable files that contain every marked string in the source code, along with a placeholder for the translated versions of these strings. Copies of these :file:`.po` files are then handed over to the individual human translators who write translations for every supported natural language. The...
python, official-docs, cpython, P0
Local_Trusted_Corpus
aecc258f-af56-46b0-9788-af88a8526f43
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,014
supabase-export-v2
ad5e883e99df499c
is given, it returns a list of all file names, in the order in which they appear in the languages list or the environment variables. .. function:: translation(domain, localedir=None, languages=None, class_=None, fallback=False)
trusted_official_docs
CPython Docs
is given, it returns a list of all file names, in the order in which they appear in the languages list or the environment variables. .. function:: translation(domain, localedir=None, languages=None, class_=None, fallback=False)
is given, it returns a list of all file names, in the order in which they appear in the languages list or the environment variables. .. function:: translation(domain, localedir=None, languages=None, class_=None, fallback=False)
python, official-docs, cpython, P0
Local_Trusted_Corpus
b248b482-e490-45c5-b9cc-d98c7f2e342b
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,088
supabase-export-v2
6c66b3ee94e86e5c
internationalized, to the local language and cultural habits. In order to provide multilingual messages for your Python programs, you need to take the following steps: #. prepare your program or module by specially marking translatable strings
trusted_official_docs
CPython Docs
internationalized, to the local language and cultural habits. In order to provide multilingual messages for your Python programs, you need to take the following steps: #. prepare your program or module by specially marking translatable strings
internationalized, to the local language and cultural habits. In order to provide multilingual messages for your Python programs, you need to take the following steps: #. prepare your program or module by specially marking translatable strings
python, official-docs, cpython, P0
Local_Trusted_Corpus
b85b235e-2bed-4b71-a452-aefd2c6f3d24
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,024
supabase-export-v2
e71c0c5171846f3c
you usually mark the strings in your application that are candidates for translation, by wrapping them in a call to the :func:`!_` function, like this:: print(_('This string will be translated.'))
trusted_official_docs
CPython Docs
you usually mark the strings in your application that are candidates for translation, by wrapping them in a call to the :func:`!_` function, like this:: print(_('This string will be translated.'))
you usually mark the strings in your application that are candidates for translation, by wrapping them in a call to the :func:`!_` function, like this:: print(_('This string will be translated.'))
python, official-docs, cpython, P0
Local_Trusted_Corpus
ba9089ce-8de7-4d2a-9c5d-73118dfef9c1
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,095
supabase-export-v2
448083beb8e5cd32
In this example, the string ``'writing a log message'`` is marked as a candidate for translation, while the strings ``'mylog.txt'`` and ``'w'`` are not. There are a few tools to extract the strings meant for translation. The original GNU :program:`gettext` only supported C or C++ source code but its extended version :p...
trusted_official_docs
CPython Docs
In this example, the string ``'writing a log message'`` is marked as a candidate for translation, while the strings ``'mylog.txt'`` and ``'w'`` are not. There are a few tools to extract the strings meant for translation. The original GNU :program:`gettext` only supported C or C++ source code but its extended version :p...
In this example, the string ``'writing a log message'`` is marked as a candidate for translation, while the strings ``'mylog.txt'`` and ``'w'`` are not. There are a few tools to extract the strings meant for translation. The original GNU :program:`gettext` only supported C or C++ source code but its extended version :p...
python, official-docs, cpython, P0
Local_Trusted_Corpus
bad379cc-66ca-4c06-ae4a-d611563d3cc6
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,016
supabase-export-v2
2a67e1affabcda0d
:file:`.mo` file names are cached. The actual class instantiated is *class_* if provided, otherwise :class:`GNUTranslations`. The class's constructor must take a single :term:`file object` argument. If multiple files are found, later files are used as fallbacks for earlier ones. To allow setting the fallback, :func:`co...
trusted_official_docs
CPython Docs
:file:`.mo` file names are cached. The actual class instantiated is *class_* if provided, otherwise :class:`GNUTranslations`. The class's constructor must take a single :term:`file object` argument. If multiple files are found, later files are used as fallbacks for earlier ones. To allow setting the fallback, :func:`co...
:file:`.mo` file names are cached. The actual class instantiated is *class_* if provided, otherwise :class:`GNUTranslations`. The class's constructor must take a single :term:`file object` argument. If multiple files are found, later files are used as fallbacks for earlier ones. To allow setting the fallback, :func:`co...
python, official-docs, cpython, P0
Local_Trusted_Corpus
bb334d97-30ec-4898-95ef-f0a980d5bc72
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
24,987
supabase-export-v2
d98ac0dbe7c31558
.. function:: bindtextdomain(domain, localedir=None) Bind the *domain* to the locale directory *localedir*. More concretely, :mod:`!gettext` will look for binary :file:`.mo` files for the given domain using the path (on Unix): :file:`{localedir}/{language}/LC_MESSAGES/{domain}.mo`, where *language* is searched for i...
trusted_official_docs
CPython Docs
.. function:: bindtextdomain(domain, localedir=None) Bind the *domain* to the locale directory *localedir*. More concretely, :mod:`!gettext` will look for binary :file:`.mo` files for the given domain using the path (on Unix): :file:`{localedir}/{language}/LC_MESSAGES/{domain}.mo`, where *language* is searched for i...
.. function:: bindtextdomain(domain, localedir=None) Bind the *domain* to the locale directory *localedir*. More concretely, :mod:`!gettext` will look for binary :file:`.mo` files for the given domain using the path (on Unix): :file:`{localedir}/{language}/LC_MESSAGES/{domain}.mo`, where *language* is searched for i...
python, official-docs, cpython, P0
Local_Trusted_Corpus
becb211c-cf33-4144-be68-d48cbfb3e7eb
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,017
supabase-export-v2
ff787832a0a7b605
allow setting the fallback, :func:`copy.copy` is used to clone each translation object from the cache; the actual instance data is still shared with the cache. If no :file:`.mo` file is found, this function raises :exc:`OSError` if *fallback* is false (which is the default), and returns a :class:`NullTranslations` in...
trusted_official_docs
CPython Docs
allow setting the fallback, :func:`copy.copy` is used to clone each translation object from the cache; the actual instance data is still shared with the cache. If no :file:`.mo` file is found, this function raises :exc:`OSError` if *fallback* is false (which is the default), and returns a :class:`NullTranslations` in...
allow setting the fallback, :func:`copy.copy` is used to clone each translation object from the cache; the actual instance data is still shared with the cache. If no :file:`.mo` file is found, this function raises :exc:`OSError` if *fallback* is false (which is the default), and returns a :class:`NullTranslations` in...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c0bdc665-d60a-46cf-8797-67a0c1f6a5ac
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,011
supabase-export-v2
dc4917044054cd7f
variables should contain a colon separated list of languages, which will be split on the colon to produce the expected list of language code strings. :func:`find` then expands and normalizes the languages, and then iterates through them, searching for an existing file built of these components:
trusted_official_docs
CPython Docs
variables should contain a colon separated list of languages, which will be split on the colon to produce the expected list of language code strings. :func:`find` then expands and normalizes the languages, and then iterates through them, searching for an existing file built of these components:
variables should contain a colon separated list of languages, which will be split on the colon to produce the expected list of language code strings. :func:`find` then expands and normalizes the languages, and then iterates through them, searching for an existing file built of these components:
python, official-docs, cpython, P0
Local_Trusted_Corpus
c17ca940-cae2-4e62-b5e8-f4c10406335f
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,004
supabase-export-v2
69f1dedaca18eb3c
Note that GNU :program:`gettext` also defines a :func:`!dcgettext` method, but this was deemed not useful and so it is currently unimplemented. Here's an example of typical usage for this API::
trusted_official_docs
CPython Docs
Note that GNU :program:`gettext` also defines a :func:`!dcgettext` method, but this was deemed not useful and so it is currently unimplemented. Here's an example of typical usage for this API::
Note that GNU :program:`gettext` also defines a :func:`!dcgettext` method, but this was deemed not useful and so it is currently unimplemented. Here's an example of typical usage for this API::
python, official-docs, cpython, P0
Local_Trusted_Corpus
c373ec25-5350-41a8-a8a8-c84463679dde
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,022
supabase-export-v2
44f474d4ba047950
This installs the function :func:`!_` in Python's builtins namespace, based on *domain* and *localedir* which are passed to the function :func:`translation`. For the *names* parameter, please see the description of the translation object's :meth:`~NullTranslations.install` method.
trusted_official_docs
CPython Docs
This installs the function :func:`!_` in Python's builtins namespace, based on *domain* and *localedir* which are passed to the function :func:`translation`. For the *names* parameter, please see the description of the translation object's :meth:`~NullTranslations.install` method.
This installs the function :func:`!_` in Python's builtins namespace, based on *domain* and *localedir* which are passed to the function :func:`translation`. For the *names* parameter, please see the description of the translation object's :meth:`~NullTranslations.install` method.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c62df67f-1673-48d6-87d0-6754c5308b38
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
24,988
supabase-export-v2
ddc0ad42e0f4e89f
for the given domain using the path (on Unix): :file:`{localedir}/{language}/LC_MESSAGES/{domain}.mo`, where *language* is searched for in the environment variables :envvar:`LANGUAGE`, :envvar:`LC_ALL`, :envvar:`LC_MESSAGES`, and :envvar:`LANG` respectively. If *localedir* is omitted or ``None``, then the current bindi...
trusted_official_docs
CPython Docs
for the given domain using the path (on Unix): :file:`{localedir}/{language}/LC_MESSAGES/{domain}.mo`, where *language* is searched for in the environment variables :envvar:`LANGUAGE`, :envvar:`LC_ALL`, :envvar:`LC_MESSAGES`, and :envvar:`LANG` respectively. If *localedir* is omitted or ``None``, then the current bindi...
for the given domain using the path (on Unix): :file:`{localedir}/{language}/LC_MESSAGES/{domain}.mo`, where *language* is searched for in the environment variables :envvar:`LANGUAGE`, :envvar:`LC_ALL`, :envvar:`LC_MESSAGES`, and :envvar:`LANG` respectively. If *localedir* is omitted or ``None``, then the current bindi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c9e310e9-0e1a-4b70-a004-823a105a0386
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,101
supabase-export-v2
0e0960d9dc01ec6c
Localizing your module ^^^^^^^^^^^^^^^^^^^^^^ If you are localizing your module, you must take care not to make global changes, e.g. to the built-in namespace. You should not use the GNU :program:`gettext` API but instead the class-based API.
trusted_official_docs
CPython Docs
Localizing your module ^^^^^^^^^^^^^^^^^^^^^^ If you are localizing your module, you must take care not to make global changes, e.g. to the built-in namespace. You should not use the GNU :program:`gettext` API but instead the class-based API.
Localizing your module ^^^^^^^^^^^^^^^^^^^^^^ If you are localizing your module, you must take care not to make global changes, e.g. to the built-in namespace. You should not use the GNU :program:`gettext` API but instead the class-based API.
python, official-docs, cpython, P0
Local_Trusted_Corpus
cdc65a81-8306-4ebc-a594-fba91ae35dfd
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,119
supabase-export-v2
19f1c8e74ee3cddb
are translated where they are coded. Occasionally however, you need to mark strings for translation, but defer actual translation until later. A classic example is:: animals = ['mollusk', 'albatross', 'rat', 'penguin', 'python', ] # ... for a in animals: print(a)
trusted_official_docs
CPython Docs
are translated where they are coded. Occasionally however, you need to mark strings for translation, but defer actual translation until later. A classic example is:: animals = ['mollusk', 'albatross', 'rat', 'penguin', 'python', ] # ... for a in animals: print(a)
are translated where they are coded. Occasionally however, you need to mark strings for translation, but defer actual translation until later. A classic example is:: animals = ['mollusk', 'albatross', 'rat', 'penguin', 'python', ] # ... for a in animals: print(a)
python, official-docs, cpython, P0
Local_Trusted_Corpus
cf9d2604-4ed1-4caf-9b10-78745de42038
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,103
supabase-export-v2
eca31994f0fe6e4d
module's various natural language translation :file:`.mo` files reside in :file:`/usr/share/locale` in GNU :program:`gettext` format. Here's what you would put at the top of your module:: import gettext t = gettext.translation('spam', '/usr/share/locale') _ = t.gettext
trusted_official_docs
CPython Docs
module's various natural language translation :file:`.mo` files reside in :file:`/usr/share/locale` in GNU :program:`gettext` format. Here's what you would put at the top of your module:: import gettext t = gettext.translation('spam', '/usr/share/locale') _ = t.gettext
module's various natural language translation :file:`.mo` files reside in :file:`/usr/share/locale` in GNU :program:`gettext` format. Here's what you would put at the top of your module:: import gettext t = gettext.translation('spam', '/usr/share/locale') _ = t.gettext
python, official-docs, cpython, P0
Local_Trusted_Corpus
d32ed890-0a29-49e9-9e6b-92023b0aa188
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,032
supabase-export-v2
23c4d4bde96a3571
.. method:: _parse(fp) No-op in the base class, this method takes file object *fp*, and reads the data from the file, initializing its message catalog. If you have an unsupported message catalog file format, you should override this method to parse your format.
trusted_official_docs
CPython Docs
.. method:: _parse(fp) No-op in the base class, this method takes file object *fp*, and reads the data from the file, initializing its message catalog. If you have an unsupported message catalog file format, you should override this method to parse your format.
.. method:: _parse(fp) No-op in the base class, this method takes file object *fp*, and reads the data from the file, initializing its message catalog. If you have an unsupported message catalog file format, you should override this method to parse your format.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d799fb8b-a760-4370-b858-b41579310ad6
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
24,982
supabase-export-v2
375adc7385fce03e
-------------- The :mod:`!gettext` module provides internationalization (I18N) and localization (L10N) services for your Python modules and applications. It supports both the GNU :program:`gettext` message catalog API and a higher level, class-based API that may be more appropriate for Python files. The interface descr...
trusted_official_docs
CPython Docs
-------------- The :mod:`!gettext` module provides internationalization (I18N) and localization (L10N) services for your Python modules and applications. It supports both the GNU :program:`gettext` message catalog API and a higher level, class-based API that may be more appropriate for Python files. The interface descr...
-------------- The :mod:`!gettext` module provides internationalization (I18N) and localization (L10N) services for your Python modules and applications. It supports both the GNU :program:`gettext` message catalog API and a higher level, class-based API that may be more appropriate for Python files. The interface descr...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d831e810-fb0d-460e-9aca-4db53226da6c
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,038
supabase-export-v2
f4a6a4fcfdf66b71
.. method:: ngettext(singular, plural, n) If a fallback has been set, forward :meth:`!ngettext` to the fallback. Otherwise, return *singular* if *n* is 1; return *plural* otherwise. Overridden in derived classes.
trusted_official_docs
CPython Docs
.. method:: ngettext(singular, plural, n) If a fallback has been set, forward :meth:`!ngettext` to the fallback. Otherwise, return *singular* if *n* is 1; return *plural* otherwise. Overridden in derived classes.
.. method:: ngettext(singular, plural, n) If a fallback has been set, forward :meth:`!ngettext` to the fallback. Otherwise, return *singular* if *n* is 1; return *plural* otherwise. Overridden in derived classes.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d9eeaf05-1ad2-4203-8d73-9ea8df50047b
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,099
supabase-export-v2
32d319b43d82e4e8
machine-readable :file:`.mo` binary catalog file using the :program:`msgfmt` program. The :file:`.mo` files are used by the :mod:`!gettext` module for the actual translation processing at run-time. How you use the :mod:`!gettext` module in your code depends on whether you are internationalizing a single module or your ...
trusted_official_docs
CPython Docs
machine-readable :file:`.mo` binary catalog file using the :program:`msgfmt` program. The :file:`.mo` files are used by the :mod:`!gettext` module for the actual translation processing at run-time. How you use the :mod:`!gettext` module in your code depends on whether you are internationalizing a single module or your ...
machine-readable :file:`.mo` binary catalog file using the :program:`msgfmt` program. The :file:`.mo` files are used by the :mod:`!gettext` module for the actual translation processing at run-time. How you use the :mod:`!gettext` module in your code depends on whether you are internationalizing a single module or your ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e229fcc1-7c9a-4d3c-9a86-586adf09c34f
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,008
supabase-export-v2
f92abbd4e45e3fbc
:file:`.mo` format files, and has methods for returning strings. Instances of this class can also install themselves in the built-in namespace as the function :func:`!_`. .. function:: find(domain, localedir=None, languages=None, all=False)
trusted_official_docs
CPython Docs
:file:`.mo` format files, and has methods for returning strings. Instances of this class can also install themselves in the built-in namespace as the function :func:`!_`. .. function:: find(domain, localedir=None, languages=None, all=False)
:file:`.mo` format files, and has methods for returning strings. Instances of this class can also install themselves in the built-in namespace as the function :func:`!_`. .. function:: find(domain, localedir=None, languages=None, all=False)
python, official-docs, cpython, P0
Local_Trusted_Corpus
e430ea66-84aa-4842-aafa-a566ed61d4f1
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,001
supabase-export-v2
78d3b40c5d9a2aa9
.. function:: pgettext(context, message) .. function:: dpgettext(domain, context, message) .. function:: npgettext(context, singular, plural, n) .. function:: dnpgettext(domain, context, singular, plural, n) Similar to the corresponding functions without the ``p`` in the prefix (that is, :func:`gettext`, :func:`dgette...
trusted_official_docs
CPython Docs
.. function:: pgettext(context, message) .. function:: dpgettext(domain, context, message) .. function:: npgettext(context, singular, plural, n) .. function:: dnpgettext(domain, context, singular, plural, n) Similar to the corresponding functions without the ``p`` in the prefix (that is, :func:`gettext`, :func:`dgette...
.. function:: pgettext(context, message) .. function:: dpgettext(domain, context, message) .. function:: npgettext(context, singular, plural, n) .. function:: dnpgettext(domain, context, singular, plural, n) Similar to the corresponding functions without the ``p`` in the prefix (that is, :func:`gettext`, :func:`dgette...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e4899f1f-33e2-4ffe-a3ee-7ce40214cc59
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,075
supabase-export-v2
8f6b8c9718ddd17b
*singular* is used as the message id for purposes of lookup in the catalog, while *n* is used to determine which plural form to use. If the message id for *context* is not found in the catalog, and a fallback is specified, the request is forwarded to the fallback's :meth:`npgettext` method. Otherwise, when *n* is 1 *...
trusted_official_docs
CPython Docs
*singular* is used as the message id for purposes of lookup in the catalog, while *n* is used to determine which plural form to use. If the message id for *context* is not found in the catalog, and a fallback is specified, the request is forwarded to the fallback's :meth:`npgettext` method. Otherwise, when *n* is 1 *...
*singular* is used as the message id for purposes of lookup in the catalog, while *n* is used to determine which plural form to use. If the message id for *context* is not found in the catalog, and a fallback is specified, the request is forwarded to the fallback's :meth:`npgettext` method. Otherwise, when *n* is 1 *...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e49e4003-b62d-4542-b942-20fe4a456d45
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,009
supabase-export-v2
988abb7ceafb8d1c
.. function:: find(domain, localedir=None, languages=None, all=False) This function implements the standard :file:`.mo` file search algorithm. It takes a *domain*, identical to what :func:`textdomain` takes. Optional *localedir* is as in :func:`bindtextdomain`. Optional *languages* is a list of strings, where each s...
trusted_official_docs
CPython Docs
.. function:: find(domain, localedir=None, languages=None, all=False) This function implements the standard :file:`.mo` file search algorithm. It takes a *domain*, identical to what :func:`textdomain` takes. Optional *localedir* is as in :func:`bindtextdomain`. Optional *languages* is a list of strings, where each s...
.. function:: find(domain, localedir=None, languages=None, all=False) This function implements the standard :file:`.mo` file search algorithm. It takes a *domain*, identical to what :func:`textdomain` takes. Optional *localedir* is as in :func:`bindtextdomain`. Optional *languages* is a list of strings, where each s...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e5f6578c-9fcf-4a08-9e44-eb1a3d85d05e
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,131
supabase-export-v2
66c69fbbea3d5a17
# ... for a in animals: print(_(a)) In this case, you are marking translatable strings with the function :func:`!N_`, which won't conflict with any definition of :func:`!_`. However, you will need to teach your message extraction program to look for translatable strings marked with :func:`!N_`. :program:`xgettext`, :pr...
trusted_official_docs
CPython Docs
# ... for a in animals: print(_(a)) In this case, you are marking translatable strings with the function :func:`!N_`, which won't conflict with any definition of :func:`!_`. However, you will need to teach your message extraction program to look for translatable strings marked with :func:`!N_`. :program:`xgettext`, :pr...
# ... for a in animals: print(_(a)) In this case, you are marking translatable strings with the function :func:`!N_`, which won't conflict with any definition of :func:`!_`. However, you will need to teach your message extraction program to look for translatable strings marked with :func:`!N_`. :program:`xgettext`, :pr...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e83220ce-c88e-4633-8326-a428d8f23628
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,066
supabase-export-v2
8dbcac72eaa54a9d
.. method:: ngettext(singular, plural, n) Do a plural-forms lookup of a message id. *singular* is used as the message id for purposes of lookup in the catalog, while *n* is used to determine which plural form to use. The returned message string is a Unicode string.
trusted_official_docs
CPython Docs
.. method:: ngettext(singular, plural, n) Do a plural-forms lookup of a message id. *singular* is used as the message id for purposes of lookup in the catalog, while *n* is used to determine which plural form to use. The returned message string is a Unicode string.
.. method:: ngettext(singular, plural, n) Do a plural-forms lookup of a message id. *singular* is used as the message id for purposes of lookup in the catalog, while *n* is used to determine which plural form to use. The returned message string is a Unicode string.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e8801ee1-56f0-4197-b529-ddf702afff07
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,074
supabase-export-v2
eb5e6c0121ffe82d
.. method:: npgettext(context, singular, plural, n) Do a plural-forms lookup of a message id. *singular* is used as the message id for purposes of lookup in the catalog, while *n* is used to determine which plural form to use.
trusted_official_docs
CPython Docs
.. method:: npgettext(context, singular, plural, n) Do a plural-forms lookup of a message id. *singular* is used as the message id for purposes of lookup in the catalog, while *n* is used to determine which plural form to use.
.. method:: npgettext(context, singular, plural, n) Do a plural-forms lookup of a message id. *singular* is used as the message id for purposes of lookup in the catalog, while *n* is used to determine which plural form to use.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ea1be714-cc93-417b-9f4f-d8dddeb9ccbc
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,026
supabase-export-v2
ddda0183c4e0a187
For convenience, you want the :func:`!_` function to be installed in Python's builtins namespace, so it is easily accessible in all modules of your application. .. versionchanged:: 3.11 *names* is now a keyword-only parameter.
trusted_official_docs
CPython Docs
For convenience, you want the :func:`!_` function to be installed in Python's builtins namespace, so it is easily accessible in all modules of your application. .. versionchanged:: 3.11 *names* is now a keyword-only parameter.
For convenience, you want the :func:`!_` function to be installed in Python's builtins namespace, so it is easily accessible in all modules of your application. .. versionchanged:: 3.11 *names* is now a keyword-only parameter.
python, official-docs, cpython, P0
Local_Trusted_Corpus
efafe07b-bf9f-4519-ac49-4380075ac00c
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,030
supabase-export-v2
2cb6adec1cadb2c9
.. class:: NullTranslations(fp=None) Takes an optional :term:`file object` *fp*, which is ignored by the base class. Initializes "protected" instance variables *_info* and *_charset* which are set by derived classes, as well as *_fallback*, which is set through :meth:`add_fallback`. It then calls ``self._parse(fp)`` ...
trusted_official_docs
CPython Docs
.. class:: NullTranslations(fp=None) Takes an optional :term:`file object` *fp*, which is ignored by the base class. Initializes "protected" instance variables *_info* and *_charset* which are set by derived classes, as well as *_fallback*, which is set through :meth:`add_fallback`. It then calls ``self._parse(fp)`` ...
.. class:: NullTranslations(fp=None) Takes an optional :term:`file object` *fp*, which is ignored by the base class. Initializes "protected" instance variables *_info* and *_charset* which are set by derived classes, as well as *_fallback*, which is set through :meth:`add_fallback`. It then calls ``self._parse(fp)`` ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f0b51389-27d4-49c4-bab9-ec4bae4772b4
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,126
supabase-export-v2
4f72af7f8cdc6369
of :func:`!_` in the built-in namespace (until the :keyword:`del` command). Take care, though if you have a previous definition of :func:`!_` in the local namespace. Note that the second use of :func:`!_` will not identify "a" as being translatable to the :program:`gettext` program, because the parameter is not a strin...
trusted_official_docs
CPython Docs
of :func:`!_` in the built-in namespace (until the :keyword:`del` command). Take care, though if you have a previous definition of :func:`!_` in the local namespace. Note that the second use of :func:`!_` will not identify "a" as being translatable to the :program:`gettext` program, because the parameter is not a strin...
of :func:`!_` in the built-in namespace (until the :keyword:`del` command). Take care, though if you have a previous definition of :func:`!_` in the local namespace. Note that the second use of :func:`!_` will not identify "a" as being translatable to the :program:`gettext` program, because the parameter is not a strin...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f1114dd1-7ee6-477f-8191-93d938fd6869
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,013
supabase-export-v2
e130d409a8e94e2d
:file:`{localedir}/{language}/LC_MESSAGES/{domain}.mo` The first such file name that exists is returned by :func:`find`. If no such file is found, then ``None`` is returned. If *all* is given, it returns a list of all file names, in the order in which they appear in the languages list or the environment variables.
trusted_official_docs
CPython Docs
:file:`{localedir}/{language}/LC_MESSAGES/{domain}.mo` The first such file name that exists is returned by :func:`find`. If no such file is found, then ``None`` is returned. If *all* is given, it returns a list of all file names, in the order in which they appear in the languages list or the environment variables.
:file:`{localedir}/{language}/LC_MESSAGES/{domain}.mo` The first such file name that exists is returned by :func:`find`. If no such file is found, then ``None`` is returned. If *all* is given, it returns a list of all file names, in the order in which they appear in the languages list or the environment variables.
python, official-docs, cpython, P0
Local_Trusted_Corpus
f32e77fc-fbe8-4e51-8ecc-26b91fa829d5
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,136
supabase-export-v2
b27a2c95a4c9191a
is :file:`{sys.base_prefix}/share/locale` (see :data:`sys.base_prefix`). For this reason, it is always best to call :func:`bindtextdomain` with an explicit absolute path at the start of your application. .. [#] See the footnote for :func:`bindtextdomain` above.
trusted_official_docs
CPython Docs
is :file:`{sys.base_prefix}/share/locale` (see :data:`sys.base_prefix`). For this reason, it is always best to call :func:`bindtextdomain` with an explicit absolute path at the start of your application. .. [#] See the footnote for :func:`bindtextdomain` above.
is :file:`{sys.base_prefix}/share/locale` (see :data:`sys.base_prefix`). For this reason, it is always best to call :func:`bindtextdomain` with an explicit absolute path at the start of your application. .. [#] See the footnote for :func:`bindtextdomain` above.
python, official-docs, cpython, P0
Local_Trusted_Corpus
f4270688-f58e-4222-8de9-d6e657880165
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,097
supabase-export-v2
e2969b5eb770adea
--help``. :program:`msgfmt.py` is binary compatible with GNU :program:`msgfmt`. With these two programs, you may not need the GNU :program:`gettext` package to internationalize your Python applications.) :program:`xgettext`, :program:`pygettext`, and similar tools generate :file:`.po` files that are message catalogs. T...
trusted_official_docs
CPython Docs
--help``. :program:`msgfmt.py` is binary compatible with GNU :program:`msgfmt`. With these two programs, you may not need the GNU :program:`gettext` package to internationalize your Python applications.) :program:`xgettext`, :program:`pygettext`, and similar tools generate :file:`.po` files that are message catalogs. T...
--help``. :program:`msgfmt.py` is binary compatible with GNU :program:`msgfmt`. With these two programs, you may not need the GNU :program:`gettext` package to internationalize your Python applications.) :program:`xgettext`, :program:`pygettext`, and similar tools generate :file:`.po` files that are message catalogs. T...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f4570eb6-70fd-4ede-9382-ff02747ae0c6
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,057
supabase-export-v2
849111e3029cd906
one additional class derived from :class:`NullTranslations`: :class:`GNUTranslations`. This class overrides :meth:`!_parse` to enable reading GNU :program:`gettext` format :file:`.mo` files in both big-endian and little-endian format. :class:`GNUTranslations` parses optional metadata out of the translation catalog. It ...
trusted_official_docs
CPython Docs
one additional class derived from :class:`NullTranslations`: :class:`GNUTranslations`. This class overrides :meth:`!_parse` to enable reading GNU :program:`gettext` format :file:`.mo` files in both big-endian and little-endian format. :class:`GNUTranslations` parses optional metadata out of the translation catalog. It ...
one additional class derived from :class:`NullTranslations`: :class:`GNUTranslations`. This class overrides :meth:`!_parse` to enable reading GNU :program:`gettext` format :file:`.mo` files in both big-endian and little-endian format. :class:`GNUTranslations` parses optional metadata out of the translation catalog. It ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f6c00f87-f158-4673-b1ad-e4856a493682
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,059
supabase-export-v2
2aa881ac9aca11dc
Since message ids are read as Unicode strings too, all ``*gettext()`` methods will assume message ids as Unicode strings, not byte strings. The entire set of key/value pairs are placed into a dictionary and set as the "protected" :attr:`!_info` instance variable.
trusted_official_docs
CPython Docs
Since message ids are read as Unicode strings too, all ``*gettext()`` methods will assume message ids as Unicode strings, not byte strings. The entire set of key/value pairs are placed into a dictionary and set as the "protected" :attr:`!_info` instance variable.
Since message ids are read as Unicode strings too, all ``*gettext()`` methods will assume message ids as Unicode strings, not byte strings. The entire set of key/value pairs are placed into a dictionary and set as the "protected" :attr:`!_info` instance variable.
python, official-docs, cpython, P0
Local_Trusted_Corpus
fb4bd940-8fc5-441a-98bf-2274ff448503
CPython Docs
file://datasets/cpython/Doc/library/gettext.rst
unknown
1df3231a-dda0-4d56-a7df-7d26149f77b7
25,064
supabase-export-v2
39bf91433dfbf13f
.. method:: gettext(message) Look up the *message* id in the catalog and return the corresponding message string, as a Unicode string. If there is no entry in the catalog for the *message* id, and a fallback has been set, the look up is forwarded to the fallback's :meth:`~NullTranslations.gettext` method. Otherwise,...
trusted_official_docs
CPython Docs
.. method:: gettext(message) Look up the *message* id in the catalog and return the corresponding message string, as a Unicode string. If there is no entry in the catalog for the *message* id, and a fallback has been set, the look up is forwarded to the fallback's :meth:`~NullTranslations.gettext` method. Otherwise,...
.. method:: gettext(message) Look up the *message* id in the catalog and return the corresponding message string, as a Unicode string. If there is no entry in the catalog for the *message* id, and a fallback has been set, the look up is forwarded to the fallback's :meth:`~NullTranslations.gettext` method. Otherwise,...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0739ef57-65b9-42ea-b003-0cea8c6a2621
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,171
supabase-export-v2
1feb0df4a6cf1c66
The *file* must be kept open until the fault handler is disabled: see :ref:`issue with file descriptors <faulthandler-fd>`. If *c_stack* is ``True``, then the C stack trace is printed after the Python traceback, unless the system does not support it. See :func:`dump_c_stack` for more information on compatibility.
trusted_official_docs
CPython Docs
The *file* must be kept open until the fault handler is disabled: see :ref:`issue with file descriptors <faulthandler-fd>`. If *c_stack* is ``True``, then the C stack trace is printed after the Python traceback, unless the system does not support it. See :func:`dump_c_stack` for more information on compatibility.
The *file* must be kept open until the fault handler is disabled: see :ref:`issue with file descriptors <faulthandler-fd>`. If *c_stack* is ``True``, then the C stack trace is printed after the Python traceback, unless the system does not support it. See :func:`dump_c_stack` for more information on compatibility.
python, official-docs, cpython, P0
Local_Trusted_Corpus
074b2dce-1624-4867-b792-41231287722e
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,186
supabase-export-v2
7df27310251d3186
called twice, the new call replaces previous parameters and resets the timeout. The timer has a sub-second resolution. *max_threads* caps the number of threads dumped. The *file* must be kept open until the traceback is dumped or :func:`cancel_dump_traceback_later` is called: see :ref:`issue with file descriptors <fa...
trusted_official_docs
CPython Docs
called twice, the new call replaces previous parameters and resets the timeout. The timer has a sub-second resolution. *max_threads* caps the number of threads dumped. The *file* must be kept open until the traceback is dumped or :func:`cancel_dump_traceback_later` is called: see :ref:`issue with file descriptors <fa...
called twice, the new call replaces previous parameters and resets the timeout. The timer has a sub-second resolution. *max_threads* caps the number of threads dumped. The *file* must be kept open until the traceback is dumped or :func:`cancel_dump_traceback_later` is called: see :ref:`issue with file descriptors <fa...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0c9079d6-3d36-4d2b-ac0d-dd96a00880e3
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,142
supabase-export-v2
8afc65412ea0cd05
uses an alternative stack for signal handlers if the :c:func:`!sigaltstack` function is available. This allows it to dump the traceback even on a stack overflow. The fault handler is called on catastrophic cases and therefore can only use signal-safe functions (e.g. it cannot allocate memory on the heap). Because of th...
trusted_official_docs
CPython Docs
uses an alternative stack for signal handlers if the :c:func:`!sigaltstack` function is available. This allows it to dump the traceback even on a stack overflow. The fault handler is called on catastrophic cases and therefore can only use signal-safe functions (e.g. it cannot allocate memory on the heap). Because of th...
uses an alternative stack for signal handlers if the :c:func:`!sigaltstack` function is available. This allows it to dump the traceback even on a stack overflow. The fault handler is called on catastrophic cases and therefore can only use signal-safe functions (e.g. it cannot allocate memory on the heap). Because of th...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1654a8ce-f96b-4a8f-9151-6d5202bc06a3
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,145
supabase-export-v2
9ef3fb8d10d40292
Python traceback is written to :data:`sys.stderr`. To see tracebacks, applications must be run in the terminal. A log file can alternatively be passed to :func:`faulthandler.enable`. The module is implemented in C, so tracebacks can be dumped on a crash or when Python is deadlocked.
trusted_official_docs
CPython Docs
Python traceback is written to :data:`sys.stderr`. To see tracebacks, applications must be run in the terminal. A log file can alternatively be passed to :func:`faulthandler.enable`. The module is implemented in C, so tracebacks can be dumped on a crash or when Python is deadlocked.
Python traceback is written to :data:`sys.stderr`. To see tracebacks, applications must be run in the terminal. A log file can alternatively be passed to :func:`faulthandler.enable`. The module is implemented in C, so tracebacks can be dumped on a crash or when Python is deadlocked.
python, official-docs, cpython, P0
Local_Trusted_Corpus
28cc8709-dfeb-40e6-9f0b-30fb502360ad
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,163
supabase-export-v2
725b023cd66b6a24
C Stack Compatibility ********************* If the system does not support the C-level :manpage:`backtrace(3)` or :manpage:`dladdr1(3)`, then C stack dumps will not work. An error will be printed instead of the stack.
trusted_official_docs
CPython Docs
C Stack Compatibility ********************* If the system does not support the C-level :manpage:`backtrace(3)` or :manpage:`dladdr1(3)`, then C stack dumps will not work. An error will be printed instead of the stack.
C Stack Compatibility ********************* If the system does not support the C-level :manpage:`backtrace(3)` or :manpage:`dladdr1(3)`, then C stack dumps will not work. An error will be printed instead of the stack.
python, official-docs, cpython, P0
Local_Trusted_Corpus
36edd064-cefc-4cda-b015-1a424a1cb463
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,164
supabase-export-v2
a11fed39a8771c30
system does not support the C-level :manpage:`backtrace(3)` or :manpage:`dladdr1(3)`, then C stack dumps will not work. An error will be printed instead of the stack. Additionally, some compilers do not support :term:`CPython's <CPython>` implementation of C stack dumps. As a result, a different error may be printed in...
trusted_official_docs
CPython Docs
system does not support the C-level :manpage:`backtrace(3)` or :manpage:`dladdr1(3)`, then C stack dumps will not work. An error will be printed instead of the stack. Additionally, some compilers do not support :term:`CPython's <CPython>` implementation of C stack dumps. As a result, a different error may be printed in...
system does not support the C-level :manpage:`backtrace(3)` or :manpage:`dladdr1(3)`, then C stack dumps will not work. An error will be printed instead of the stack. Additionally, some compilers do not support :term:`CPython's <CPython>` implementation of C stack dumps. As a result, a different error may be printed in...
python, official-docs, cpython, P0
Local_Trusted_Corpus
374c2cf9-6eaf-47d1-a9f1-84724a7f3034
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,172
supabase-export-v2
f070da5b3e01af71
then the C stack trace is printed after the Python traceback, unless the system does not support it. See :func:`dump_c_stack` for more information on compatibility. *max_threads* caps the number of threads dumped when a fatal signal fires.
trusted_official_docs
CPython Docs
then the C stack trace is printed after the Python traceback, unless the system does not support it. See :func:`dump_c_stack` for more information on compatibility. *max_threads* caps the number of threads dumped when a fatal signal fires.
then the C stack trace is printed after the Python traceback, unless the system does not support it. See :func:`dump_c_stack` for more information on compatibility. *max_threads* caps the number of threads dumped when a fatal signal fires.
python, official-docs, cpython, P0
Local_Trusted_Corpus
3a53a717-df5c-4db0-afb4-eeb96b3e7f71
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,170
supabase-export-v2
797c61a177f815c5
:const:`~signal.SIGBUS` and :const:`~signal.SIGILL` signals to dump the Python traceback. If *all_threads* is ``True``, produce tracebacks for every running thread. Otherwise, dump only the current thread. The *file* must be kept open until the fault handler is disabled: see :ref:`issue with file descriptors <faulthan...
trusted_official_docs
CPython Docs
:const:`~signal.SIGBUS` and :const:`~signal.SIGILL` signals to dump the Python traceback. If *all_threads* is ``True``, produce tracebacks for every running thread. Otherwise, dump only the current thread. The *file* must be kept open until the fault handler is disabled: see :ref:`issue with file descriptors <faulthan...
:const:`~signal.SIGBUS` and :const:`~signal.SIGILL` signals to dump the Python traceback. If *all_threads* is ``True``, produce tracebacks for every running thread. Otherwise, dump only the current thread. The *file* must be kept open until the fault handler is disabled: see :ref:`issue with file descriptors <faulthan...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3b3a73e1-4a6d-4f0d-9952-e21a10fd62b8
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,153
supabase-export-v2
ce14acd41dd1e316
Dump the tracebacks of all threads into *file*. If *all_threads* is ``False``, dump only the current thread. *max_threads* caps the number of threads dumped. .. seealso:: :func:`traceback.print_tb`, which can be used to print a traceback object.
trusted_official_docs
CPython Docs
Dump the tracebacks of all threads into *file*. If *all_threads* is ``False``, dump only the current thread. *max_threads* caps the number of threads dumped. .. seealso:: :func:`traceback.print_tb`, which can be used to print a traceback object.
Dump the tracebacks of all threads into *file*. If *all_threads* is ``False``, dump only the current thread. *max_threads* caps the number of threads dumped. .. seealso:: :func:`traceback.print_tb`, which can be used to print a traceback object.
python, official-docs, cpython, P0
Local_Trusted_Corpus
43d44803-2824-41f0-96ad-37b70a198a24
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,185
supabase-export-v2
5961cb70fe0689ca
.. function:: dump_traceback_later(timeout, repeat=False, file=sys.stderr, exit=False, *, max_threads=100) Dump the tracebacks of all threads, after a timeout of *timeout* seconds, or every *timeout* seconds if *repeat* is ``True``. If *exit* is ``True``, call :c:func:`!_exit` with status=1 after dumping the tracebac...
trusted_official_docs
CPython Docs
.. function:: dump_traceback_later(timeout, repeat=False, file=sys.stderr, exit=False, *, max_threads=100) Dump the tracebacks of all threads, after a timeout of *timeout* seconds, or every *timeout* seconds if *repeat* is ``True``. If *exit* is ``True``, call :c:func:`!_exit` with status=1 after dumping the tracebac...
.. function:: dump_traceback_later(timeout, repeat=False, file=sys.stderr, exit=False, *, max_threads=100) Dump the tracebacks of all threads, after a timeout of *timeout* seconds, or every *timeout* seconds if *repeat* is ``True``. If *exit* is ``True``, call :c:func:`!_exit` with status=1 after dumping the tracebac...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5fd77619-5ec5-426b-8a49-8e78114aacbf
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,160
supabase-export-v2
e097a72325f24f7b
Dump the C stack trace of the current thread into *file*. If the Python build does not support it or the operating system does not provide a stack trace, then this prints an error in place of a dumped C stack.
trusted_official_docs
CPython Docs
Dump the C stack trace of the current thread into *file*. If the Python build does not support it or the operating system does not provide a stack trace, then this prints an error in place of a dumped C stack.
Dump the C stack trace of the current thread into *file*. If the Python build does not support it or the operating system does not provide a stack trace, then this prints an error in place of a dumped C stack.
python, official-docs, cpython, P0
Local_Trusted_Corpus
74b314a4-45b8-4bea-a043-869db1e11191
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,177
supabase-export-v2
6bfaf1c79cbfc49a
.. versionchanged:: 3.14 Only the current thread is dumped if the :term:`GIL` is disabled to prevent the risk of data races. .. versionchanged:: 3.14 The dump now displays the C stack trace if *c_stack* is true.
trusted_official_docs
CPython Docs
.. versionchanged:: 3.14 Only the current thread is dumped if the :term:`GIL` is disabled to prevent the risk of data races. .. versionchanged:: 3.14 The dump now displays the C stack trace if *c_stack* is true.
.. versionchanged:: 3.14 Only the current thread is dumped if the :term:`GIL` is disabled to prevent the risk of data races. .. versionchanged:: 3.14 The dump now displays the C stack trace if *c_stack* is true.
python, official-docs, cpython, P0
Local_Trusted_Corpus
81f035b3-e6a2-40f3-bffc-915cf0e534f7
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,204
supabase-export-v2
b81a912f0be2db13
Issue with file descriptors --------------------------- :func:`enable`, :func:`dump_traceback_later` and :func:`register` keep the file descriptor of their *file* argument. If the file is closed and its file descriptor is reused by a new file, or if :func:`os.dup2` is used to replace the file descriptor, the traceback ...
trusted_official_docs
CPython Docs
Issue with file descriptors --------------------------- :func:`enable`, :func:`dump_traceback_later` and :func:`register` keep the file descriptor of their *file* argument. If the file is closed and its file descriptor is reused by a new file, or if :func:`os.dup2` is used to replace the file descriptor, the traceback ...
Issue with file descriptors --------------------------- :func:`enable`, :func:`dump_traceback_later` and :func:`register` keep the file descriptor of their *file* argument. If the file is closed and its file descriptor is reused by a new file, or if :func:`os.dup2` is used to replace the file descriptor, the traceback ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8aa8576b-6cca-4e6e-9886-de939f2f2851
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,143
supabase-export-v2
51e3ee8a82458b8f
only use signal-safe functions (e.g. it cannot allocate memory on the heap). Because of this limitation traceback dumping is minimal compared to normal Python tracebacks: * Only ASCII is supported. The ``backslashreplace`` error handler is used on encoding. * Each string is limited to 500 characters. * Only the filena...
trusted_official_docs
CPython Docs
only use signal-safe functions (e.g. it cannot allocate memory on the heap). Because of this limitation traceback dumping is minimal compared to normal Python tracebacks: * Only ASCII is supported. The ``backslashreplace`` error handler is used on encoding. * Each string is limited to 500 characters. * Only the filena...
only use signal-safe functions (e.g. it cannot allocate memory on the heap). Because of this limitation traceback dumping is minimal compared to normal Python tracebacks: * Only ASCII is supported. The ``backslashreplace`` error handler is used on encoding. * Each string is limited to 500 characters. * Only the filena...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8b39702f-95b5-4da5-9bad-52bf6f31448e
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,196
supabase-export-v2
53a5765cc737bf03
of the current thread if *all_threads* is ``False``, into *file*. Call the previous handler if chain is ``True``. *max_threads* caps the number of threads dumped. The *file* must be kept open until the signal is unregistered by :func:`unregister`: see :ref:`issue with file descriptors <faulthandler-fd>`.
trusted_official_docs
CPython Docs
of the current thread if *all_threads* is ``False``, into *file*. Call the previous handler if chain is ``True``. *max_threads* caps the number of threads dumped. The *file* must be kept open until the signal is unregistered by :func:`unregister`: see :ref:`issue with file descriptors <faulthandler-fd>`.
of the current thread if *all_threads* is ``False``, into *file*. Call the previous handler if chain is ``True``. *max_threads* caps the number of threads dumped. The *file* must be kept open until the signal is unregistered by :func:`unregister`: see :ref:`issue with file descriptors <faulthandler-fd>`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a2a68b81-307d-4ae8-aefd-b9d1bc171ab4
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,175
supabase-export-v2
0eb8f06519339879
.. versionchanged:: 3.6 On Windows, a handler for Windows exception is also installed. .. versionchanged:: 3.10 The dump now mentions if a garbage collector collection is running if *all_threads* is true.
trusted_official_docs
CPython Docs
.. versionchanged:: 3.6 On Windows, a handler for Windows exception is also installed. .. versionchanged:: 3.10 The dump now mentions if a garbage collector collection is running if *all_threads* is true.
.. versionchanged:: 3.6 On Windows, a handler for Windows exception is also installed. .. versionchanged:: 3.10 The dump now mentions if a garbage collector collection is running if *all_threads* is true.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b696fd17-6ebe-46f6-a4db-1f97edb9bc05
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,195
supabase-export-v2
20ab9798288443cd
.. function:: register(signum, file=sys.stderr, all_threads=True, chain=False, *, max_threads=100) Register a user signal: install a handler for the *signum* signal to dump the traceback of all threads, or of the current thread if *all_threads* is ``False``, into *file*. Call the previous handler if chain is ``True``...
trusted_official_docs
CPython Docs
.. function:: register(signum, file=sys.stderr, all_threads=True, chain=False, *, max_threads=100) Register a user signal: install a handler for the *signum* signal to dump the traceback of all threads, or of the current thread if *all_threads* is ``False``, into *file*. Call the previous handler if chain is ``True``...
.. function:: register(signum, file=sys.stderr, all_threads=True, chain=False, *, max_threads=100) Register a user signal: install a handler for the *signum* signal to dump the traceback of all threads, or of the current thread if *all_threads* is ``False``, into *file*. Call the previous handler if chain is ``True``...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b8138312-58ed-49b4-9791-2737d46a8fe7
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,141
supabase-export-v2
c21bf37363e10bc1
and :const:`~signal.SIGILL` signals. You can also enable them at startup by setting the :envvar:`PYTHONFAULTHANDLER` environment variable or by using the :option:`-X` ``faulthandler`` command line option. The fault handler is compatible with system fault handlers like Apport or the Windows fault handler. The module use...
trusted_official_docs
CPython Docs
and :const:`~signal.SIGILL` signals. You can also enable them at startup by setting the :envvar:`PYTHONFAULTHANDLER` environment variable or by using the :option:`-X` ``faulthandler`` command line option. The fault handler is compatible with system fault handlers like Apport or the Windows fault handler. The module use...
and :const:`~signal.SIGILL` signals. You can also enable them at startup by setting the :envvar:`PYTHONFAULTHANDLER` environment variable or by using the :option:`-X` ``faulthandler`` command line option. The fault handler is compatible with system fault handlers like Apport or the Windows fault handler. The module use...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b9c66ef6-d291-4a9c-9038-9c5396cc3ff7
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,176
supabase-export-v2
914e10bd7af32ced
.. versionchanged:: 3.10 The dump now mentions if a garbage collector collection is running if *all_threads* is true. .. versionchanged:: 3.14 Only the current thread is dumped if the :term:`GIL` is disabled to prevent the risk of data races.
trusted_official_docs
CPython Docs
.. versionchanged:: 3.10 The dump now mentions if a garbage collector collection is running if *all_threads* is true. .. versionchanged:: 3.14 Only the current thread is dumped if the :term:`GIL` is disabled to prevent the risk of data races.
.. versionchanged:: 3.10 The dump now mentions if a garbage collector collection is running if *all_threads* is true. .. versionchanged:: 3.14 Only the current thread is dumped if the :term:`GIL` is disabled to prevent the risk of data races.
python, official-docs, cpython, P0
Local_Trusted_Corpus
cf450811-a120-413f-b84a-ff6c7259d891
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,144
supabase-export-v2
264e057419b8bee9
is limited to 100 frames per thread, and 100 threads (configurable via *max_threads*). * The order is reversed: the most recent call is shown first. By default, the Python traceback is written to :data:`sys.stderr`. To see tracebacks, applications must be run in the terminal. A log file can alternatively be passed to :...
trusted_official_docs
CPython Docs
is limited to 100 frames per thread, and 100 threads (configurable via *max_threads*). * The order is reversed: the most recent call is shown first. By default, the Python traceback is written to :data:`sys.stderr`. To see tracebacks, applications must be run in the terminal. A log file can alternatively be passed to :...
is limited to 100 frames per thread, and 100 threads (configurable via *max_threads*). * The order is reversed: the most recent call is shown first. By default, the Python traceback is written to :data:`sys.stderr`. To see tracebacks, applications must be run in the terminal. A log file can alternatively be passed to :...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d719d565-8cc2-48c6-affa-d827c59dc8f1
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,169
supabase-export-v2
86ce3d5261e2c1fb
.. function:: enable(file=sys.stderr, all_threads=True, c_stack=True, *, max_threads=100) Enable the fault handler: install handlers for the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS` and :const:`~signal.SIGILL` signals to dump the Python traceback. If *all_t...
trusted_official_docs
CPython Docs
.. function:: enable(file=sys.stderr, all_threads=True, c_stack=True, *, max_threads=100) Enable the fault handler: install handlers for the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS` and :const:`~signal.SIGILL` signals to dump the Python traceback. If *all_t...
.. function:: enable(file=sys.stderr, all_threads=True, c_stack=True, *, max_threads=100) Enable the fault handler: install handlers for the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS` and :const:`~signal.SIGILL` signals to dump the Python traceback. If *all_t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d7c9b98b-f400-4803-a779-8cdad5bec6e3
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,140
supabase-export-v2
669f116c66dd1d8e
---------------- This module contains functions to dump Python tracebacks explicitly, on a fault, after a timeout, or on a user signal. Call :func:`faulthandler.enable` to install fault handlers for the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS`, and :const:`~si...
trusted_official_docs
CPython Docs
---------------- This module contains functions to dump Python tracebacks explicitly, on a fault, after a timeout, or on a user signal. Call :func:`faulthandler.enable` to install fault handlers for the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS`, and :const:`~si...
---------------- This module contains functions to dump Python tracebacks explicitly, on a fault, after a timeout, or on a user signal. Call :func:`faulthandler.enable` to install fault handlers for the :const:`~signal.SIGSEGV`, :const:`~signal.SIGFPE`, :const:`~signal.SIGABRT`, :const:`~signal.SIGBUS`, and :const:`~si...
python, official-docs, cpython, P0
Local_Trusted_Corpus
dd3763ec-e322-453a-b8df-dcd005c82e48
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,152
supabase-export-v2
ca3c7dc7a67ffa1b
.. function:: dump_traceback(file=sys.stderr, all_threads=True, *, max_threads=100) Dump the tracebacks of all threads into *file*. If *all_threads* is ``False``, dump only the current thread. *max_threads* caps the number of threads dumped.
trusted_official_docs
CPython Docs
.. function:: dump_traceback(file=sys.stderr, all_threads=True, *, max_threads=100) Dump the tracebacks of all threads into *file*. If *all_threads* is ``False``, dump only the current thread. *max_threads* caps the number of threads dumped.
.. function:: dump_traceback(file=sys.stderr, all_threads=True, *, max_threads=100) Dump the tracebacks of all threads into *file*. If *all_threads* is ``False``, dump only the current thread. *max_threads* caps the number of threads dumped.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e4a7ae07-6819-417b-92eb-b3e3ca7e9701
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,210
supabase-export-v2
c8d51f740b168a91
$ python -q -X faulthandler >>> import ctypes >>> ctypes.string_at(0) Fatal Python error: Segmentation fault Current thread 0x00007fb899f39700 (most recent call first): File "/opt/python/Lib/ctypes/__init__.py", line 486 in string_at File "<stdin>", line 1 in <module>
trusted_official_docs
CPython Docs
$ python -q -X faulthandler >>> import ctypes >>> ctypes.string_at(0) Fatal Python error: Segmentation fault Current thread 0x00007fb899f39700 (most recent call first): File "/opt/python/Lib/ctypes/__init__.py", line 486 in string_at File "<stdin>", line 1 in <module>
$ python -q -X faulthandler >>> import ctypes >>> ctypes.string_at(0) Fatal Python error: Segmentation fault Current thread 0x00007fb899f39700 (most recent call first): File "/opt/python/Lib/ctypes/__init__.py", line 486 in string_at File "<stdin>", line 1 in <module>
python, official-docs, cpython, P0
Local_Trusted_Corpus
f600affb-b52a-427f-abee-8b9223d382eb
CPython Docs
file://datasets/cpython/Doc/library/faulthandler.rst
unknown
6fe1d31b-de1c-483c-8225-96423ce5b859
25,211
supabase-export-v2
2878ff55b2ae8867
Current thread 0x00007fb899f39700 (most recent call first): File "/opt/python/Lib/ctypes/__init__.py", line 486 in string_at File "<stdin>", line 1 in <module> Current thread's C stack trace (most recent call first): Binary file "/opt/python/python", at _Py_DumpStack+0x42 [0x5b27f7d7147e] Binary file "/opt/python/pyt...
trusted_official_docs
CPython Docs
Current thread 0x00007fb899f39700 (most recent call first): File "/opt/python/Lib/ctypes/__init__.py", line 486 in string_at File "<stdin>", line 1 in <module> Current thread's C stack trace (most recent call first): Binary file "/opt/python/python", at _Py_DumpStack+0x42 [0x5b27f7d7147e] Binary file "/opt/python/pyt...
Current thread 0x00007fb899f39700 (most recent call first): File "/opt/python/Lib/ctypes/__init__.py", line 486 in string_at File "<stdin>", line 1 in <module> Current thread's C stack trace (most recent call first): Binary file "/opt/python/python", at _Py_DumpStack+0x42 [0x5b27f7d7147e] Binary file "/opt/python/pyt...
python, official-docs, cpython, P0
Local_Trusted_Corpus
00f3435d-a712-4641-9514-162f0972d126
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,393
supabase-export-v2
07432bb9136e514b
Afterward ``date2 - date1 == timedelta.days``. ``timedelta.seconds`` and ``timedelta.microseconds`` are ignored. :exc:`OverflowError` is raised if ``date2.year`` would be smaller than :const:`MINYEAR` or larger than :const:`MAXYEAR`. (2) ``timedelta.seconds`` and ``timedelta.microseconds`` are ignored.
trusted_official_docs
CPython Docs
Afterward ``date2 - date1 == timedelta.days``. ``timedelta.seconds`` and ``timedelta.microseconds`` are ignored. :exc:`OverflowError` is raised if ``date2.year`` would be smaller than :const:`MINYEAR` or larger than :const:`MAXYEAR`. (2) ``timedelta.seconds`` and ``timedelta.microseconds`` are ignored.
Afterward ``date2 - date1 == timedelta.days``. ``timedelta.seconds`` and ``timedelta.microseconds`` are ignored. :exc:`OverflowError` is raised if ``date2.year`` would be smaller than :const:`MINYEAR` or larger than :const:`MAXYEAR`. (2) ``timedelta.seconds`` and ``timedelta.microseconds`` are ignored.
python, official-docs, cpython, P0
Local_Trusted_Corpus
02210169-7515-4c2e-9ce4-421d172750f2
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,277
supabase-export-v2
87cd23be71d54d63
All arguments are optional and default to 0. Arguments may be integers or floats, and may be positive or negative. Only *days*, *seconds* and *microseconds* are stored internally. Arguments are converted to those units:
trusted_official_docs
CPython Docs
All arguments are optional and default to 0. Arguments may be integers or floats, and may be positive or negative. Only *days*, *seconds* and *microseconds* are stored internally. Arguments are converted to those units:
All arguments are optional and default to 0. Arguments may be integers or floats, and may be positive or negative. Only *days*, *seconds* and *microseconds* are stored internally. Arguments are converted to those units:
python, official-docs, cpython, P0
Local_Trusted_Corpus
023fd2f8-5fcf-49cd-9790-1f03b3de9eae
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,371
supabase-export-v2
1791e06a4c8385f4
.. note:: If *format* specifies a day of month (``%d``) without a year, :exc:`ValueError` is raised. This is to avoid a quadrennial leap year bug in code seeking to parse only a month and day as the default year used in absence of one in the format is not a leap year. The workaround is to always include a year in yo...
trusted_official_docs
CPython Docs
.. note:: If *format* specifies a day of month (``%d``) without a year, :exc:`ValueError` is raised. This is to avoid a quadrennial leap year bug in code seeking to parse only a month and day as the default year used in absence of one in the format is not a leap year. The workaround is to always include a year in yo...
.. note:: If *format* specifies a day of month (``%d``) without a year, :exc:`ValueError` is raised. This is to avoid a quadrennial leap year bug in code seeking to parse only a month and day as the default year used in absence of one in the format is not a leap year. The workaround is to always include a year in yo...
python, official-docs, cpython, P0
Local_Trusted_Corpus
05408bf2-6043-482b-bbb7-94ed0b56d9e7
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,854
supabase-export-v2
8e53b2624b20aac8
directives are not interchangeable with the year and week number directives above. Calling :meth:`~.datetime.strptime` with incomplete or ambiguous ISO 8601 directives will raise a :exc:`ValueError`. Several additional directives not required by the C11 standard are included for convenience.
trusted_official_docs
CPython Docs
directives are not interchangeable with the year and week number directives above. Calling :meth:`~.datetime.strptime` with incomplete or ambiguous ISO 8601 directives will raise a :exc:`ValueError`. Several additional directives not required by the C11 standard are included for convenience.
directives are not interchangeable with the year and week number directives above. Calling :meth:`~.datetime.strptime` with incomplete or ambiguous ISO 8601 directives will raise a :exc:`ValueError`. Several additional directives not required by the C11 standard are included for convenience.
python, official-docs, cpython, P0
Local_Trusted_Corpus
0569cecc-d24b-4e01-b41d-6d25ffa8f22c
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,633
supabase-export-v2
eed25e15c8cd49b7
optional argument *timespec* specifies the number of additional components of the time to include (the default is ``'auto'``). It can be one of the following: - ``'auto'``: Same as ``'seconds'`` if :attr:`microsecond` is 0, same as ``'microseconds'`` otherwise. - ``'hours'``: Include the :attr:`hour` in the two-digit ...
trusted_official_docs
CPython Docs
optional argument *timespec* specifies the number of additional components of the time to include (the default is ``'auto'``). It can be one of the following: - ``'auto'``: Same as ``'seconds'`` if :attr:`microsecond` is 0, same as ``'microseconds'`` otherwise. - ``'hours'``: Include the :attr:`hour` in the two-digit ...
optional argument *timespec* specifies the number of additional components of the time to include (the default is ``'auto'``). It can be one of the following: - ``'auto'``: Same as ``'seconds'`` if :attr:`microsecond` is 0, same as ``'microseconds'`` otherwise. - ``'hours'``: Include the :attr:`hour` in the two-digit ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
07f501b6-a101-4828-8e63-80eb936ad781
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,652
supabase-export-v2
914873a22df1376d
it possible to specify a format string for a :class:`.datetime` object in :ref:`formatted string literals <f-strings>` and when using :meth:`str.format`. See also :ref:`strftime-strptime-behavior` and :meth:`datetime.isoformat`. Examples of usage: :class:`!datetime` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
trusted_official_docs
CPython Docs
it possible to specify a format string for a :class:`.datetime` object in :ref:`formatted string literals <f-strings>` and when using :meth:`str.format`. See also :ref:`strftime-strptime-behavior` and :meth:`datetime.isoformat`. Examples of usage: :class:`!datetime` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
it possible to specify a format string for a :class:`.datetime` object in :ref:`formatted string literals <f-strings>` and when using :meth:`str.format`. See also :ref:`strftime-strptime-behavior` and :meth:`datetime.isoformat`. Examples of usage: :class:`!datetime` ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
python, official-docs, cpython, P0
Local_Trusted_Corpus
098fd119-9904-42e7-bf31-a143e6966ebe
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,438
supabase-export-v2
0846f83dfc9f390d
.. method:: date.strftime(format) Return a string representing the date, controlled by an explicit format string. Format codes referring to hours, minutes or seconds will see 0 values. See also :ref:`strftime-strptime-behavior` and :meth:`date.isoformat`.
trusted_official_docs
CPython Docs
.. method:: date.strftime(format) Return a string representing the date, controlled by an explicit format string. Format codes referring to hours, minutes or seconds will see 0 values. See also :ref:`strftime-strptime-behavior` and :meth:`date.isoformat`.
.. method:: date.strftime(format) Return a string representing the date, controlled by an explicit format string. Format codes referring to hours, minutes or seconds will see 0 values. See also :ref:`strftime-strptime-behavior` and :meth:`date.isoformat`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
099b61ed-8686-447e-8c8b-9786519221da
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,556
supabase-export-v2
fbd20d4a240d2163
Naive and aware :class:`.datetime` objects are never equal. If both comparands are aware, and have the same :attr:`!tzinfo` attribute, the :attr:`!tzinfo` and :attr:`~.datetime.fold` attributes are ignored and the base datetimes are compared. If both comparands are aware and have different :attr:`~.datetime.tzinfo` ...
trusted_official_docs
CPython Docs
Naive and aware :class:`.datetime` objects are never equal. If both comparands are aware, and have the same :attr:`!tzinfo` attribute, the :attr:`!tzinfo` and :attr:`~.datetime.fold` attributes are ignored and the base datetimes are compared. If both comparands are aware and have different :attr:`~.datetime.tzinfo` ...
Naive and aware :class:`.datetime` objects are never equal. If both comparands are aware, and have the same :attr:`!tzinfo` attribute, the :attr:`!tzinfo` and :attr:`~.datetime.fold` attributes are ignored and the base datetimes are compared. If both comparands are aware and have different :attr:`~.datetime.tzinfo` ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
09b60839-dbf2-4753-8814-5ae4b4f91d6a
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,696
supabase-export-v2
2c36c972071bde57
Naive and aware :class:`!time` objects are never equal. Order comparison between naive and aware :class:`!time` objects raises :exc:`TypeError`. If both comparands are aware, and have the same :attr:`~.time.tzinfo` attribute, the :attr:`!tzinfo` and :attr:`!fold` attributes are ignored and the base times are compared. ...
trusted_official_docs
CPython Docs
Naive and aware :class:`!time` objects are never equal. Order comparison between naive and aware :class:`!time` objects raises :exc:`TypeError`. If both comparands are aware, and have the same :attr:`~.time.tzinfo` attribute, the :attr:`!tzinfo` and :attr:`!fold` attributes are ignored and the base times are compared. ...
Naive and aware :class:`!time` objects are never equal. Order comparison between naive and aware :class:`!time` objects raises :exc:`TypeError`. If both comparands are aware, and have the same :attr:`~.time.tzinfo` attribute, the :attr:`!tzinfo` and :attr:`!fold` attributes are ignored and the base times are compared. ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
09d4a83e-f52c-451b-b7a5-707090cfe2e7
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,499
supabase-export-v2
36d050b5dd01b15d
if the timestamp is out of the range of values supported by the platform C :c:func:`gmtime` function. Raise :exc:`OSError` instead of :exc:`ValueError` on :c:func:`gmtime` failure. .. versionchanged:: 3.15 Accepts any real number as *timestamp*, not only integer or float.
trusted_official_docs
CPython Docs
if the timestamp is out of the range of values supported by the platform C :c:func:`gmtime` function. Raise :exc:`OSError` instead of :exc:`ValueError` on :c:func:`gmtime` failure. .. versionchanged:: 3.15 Accepts any real number as *timestamp*, not only integer or float.
if the timestamp is out of the range of values supported by the platform C :c:func:`gmtime` function. Raise :exc:`OSError` instead of :exc:`ValueError` on :c:func:`gmtime` failure. .. versionchanged:: 3.15 Accepts any real number as *timestamp*, not only integer or float.
python, official-docs, cpython, P0
Local_Trusted_Corpus
0a14cf72-5d50-4b72-a46e-2b46ff9f7b33
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,904
supabase-export-v2
91b9458b80eaf958
.. versionchanged:: 3.15 Using ``%d`` without a year now raises :exc:`ValueError`. .. deprecated-removed:: 3.15 3.17 :meth:`~.datetime.strptime` calls using a format string containing ``%e`` without a year now emit a :exc:`DeprecationWarning`.
trusted_official_docs
CPython Docs
.. versionchanged:: 3.15 Using ``%d`` without a year now raises :exc:`ValueError`. .. deprecated-removed:: 3.15 3.17 :meth:`~.datetime.strptime` calls using a format string containing ``%e`` without a year now emit a :exc:`DeprecationWarning`.
.. versionchanged:: 3.15 Using ``%d`` without a year now raises :exc:`ValueError`. .. deprecated-removed:: 3.15 3.17 :meth:`~.datetime.strptime` calls using a format string containing ``%e`` without a year now emit a :exc:`DeprecationWarning`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
0a926419-6ddc-483a-88a9-09cc33c2f0ae
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,851
supabase-export-v2
c6b5c936118ff224
| | | | week 0. | | | +-----------+--------------------------------+------------------------+-------+ | ``%x`` | Locale's appropriate date || 08/16/88 (None); | \(1) | | | representation. || 08/16/1988 (en_US); | | | | || 16.08.1988 (de_DE) | | +-----------+--------------------------------+------------------------+----...
trusted_official_docs
CPython Docs
| | | | week 0. | | | +-----------+--------------------------------+------------------------+-------+ | ``%x`` | Locale's appropriate date || 08/16/88 (None); | \(1) | | | representation. || 08/16/1988 (en_US); | | | | || 16.08.1988 (de_DE) | | +-----------+--------------------------------+------------------------+----...
| | | | week 0. | | | +-----------+--------------------------------+------------------------+-------+ | ``%x`` | Locale's appropriate date || 08/16/88 (None); | \(1) | | | representation. || 08/16/1988 (en_US); | | | | || 16.08.1988 (de_DE) | | +-----------+--------------------------------+------------------------+----...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0ab342d3-d80d-4280-a37a-4b57c63c5625
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,575
supabase-export-v2
905d0a91ee011802
.. method:: datetime.astimezone(tz=None) Return a :class:`.datetime` object with new :attr:`.tzinfo` attribute *tz*, adjusting the date and time data so the result is the same UTC time as *self*, but in *tz*'s local time.
trusted_official_docs
CPython Docs
.. method:: datetime.astimezone(tz=None) Return a :class:`.datetime` object with new :attr:`.tzinfo` attribute *tz*, adjusting the date and time data so the result is the same UTC time as *self*, but in *tz*'s local time.
.. method:: datetime.astimezone(tz=None) Return a :class:`.datetime` object with new :attr:`.tzinfo` attribute *tz*, adjusting the date and time data so the result is the same UTC time as *self*, but in *tz*'s local time.
python, official-docs, cpython, P0
Local_Trusted_Corpus
0bf52746-f780-433e-8b46-cffd891807b0
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,867
supabase-export-v2
060370646addcde1
.. testsetup:: # doctest seems to turn the warning into an error which makes it # show up and require matching and prevents the actual interesting # exception from being raised. # Manually apply the catch_warnings context manager import warnings catch_warnings = warnings.catch_warnings() catch_warnings.__enter__()...
trusted_official_docs
CPython Docs
.. testsetup:: # doctest seems to turn the warning into an error which makes it # show up and require matching and prevents the actual interesting # exception from being raised. # Manually apply the catch_warnings context manager import warnings catch_warnings = warnings.catch_warnings() catch_warnings.__enter__()...
.. testsetup:: # doctest seems to turn the warning into an error which makes it # show up and require matching and prevents the actual interesting # exception from being raised. # Manually apply the catch_warnings context manager import warnings catch_warnings = warnings.catch_warnings() catch_warnings.__enter__()...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0bfa9de9-b150-4d92-bcf6-f357769f2569
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,874
supabase-export-v2
9956143fc8d960dd
used, as :class:`!time` objects have no such values. If they're used anyway, 1900 is substituted for the year, and 1 for the month and day. For :class:`date` objects, the format codes for hours, minutes, seconds, and microseconds should not be used, as :class:`date` objects have no such values. If they're used anyway, ...
trusted_official_docs
CPython Docs
used, as :class:`!time` objects have no such values. If they're used anyway, 1900 is substituted for the year, and 1 for the month and day. For :class:`date` objects, the format codes for hours, minutes, seconds, and microseconds should not be used, as :class:`date` objects have no such values. If they're used anyway, ...
used, as :class:`!time` objects have no such values. If they're used anyway, 1900 is substituted for the year, and 1 for the month and day. For :class:`date` objects, the format codes for hours, minutes, seconds, and microseconds should not be used, as :class:`date` objects have no such values. If they're used anyway, ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0c3d4dd3-e74e-437b-b6c4-dfa4f223d282
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,606
supabase-export-v2
2162aa413c837958
Return POSIX timestamp corresponding to the :class:`.datetime` instance. The return value is a :class:`float` similar to that returned by :func:`time.time`. Naive :class:`.datetime` instances are assumed to represent local time and this method relies on platform C functions to perform the conversion. Since :class:`!d...
trusted_official_docs
CPython Docs
Return POSIX timestamp corresponding to the :class:`.datetime` instance. The return value is a :class:`float` similar to that returned by :func:`time.time`. Naive :class:`.datetime` instances are assumed to represent local time and this method relies on platform C functions to perform the conversion. Since :class:`!d...
Return POSIX timestamp corresponding to the :class:`.datetime` instance. The return value is a :class:`float` similar to that returned by :func:`time.time`. Naive :class:`.datetime` instances are assumed to represent local time and this method relies on platform C functions to perform the conversion. Since :class:`!d...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0ea3a3e1-887e-479c-96a3-b3adfac819ae
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,315
supabase-export-v2
3b62bd3cd9fc7c36
* -1``. (1)(4) | +--------------------------------+-----------------------------------------------+ | ``abs(t)`` | Equivalent to ``+t`` when ``t.days >= 0``, | | | and to ``-t`` when ``t.days < 0``. (2) | +--------------------------------+-----------------------------------------------+ | ``str(t)`` | Returns a string ...
trusted_official_docs
CPython Docs
* -1``. (1)(4) | +--------------------------------+-----------------------------------------------+ | ``abs(t)`` | Equivalent to ``+t`` when ``t.days >= 0``, | | | and to ``-t`` when ``t.days < 0``. (2) | +--------------------------------+-----------------------------------------------+ | ``str(t)`` | Returns a string ...
* -1``. (1)(4) | +--------------------------------+-----------------------------------------------+ | ``abs(t)`` | Equivalent to ``+t`` when ``t.days >= 0``, | | | and to ``-t`` when ``t.days < 0``. (2) | +--------------------------------+-----------------------------------------------+ | ``str(t)`` | Returns a string ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0efcea54-2ccd-458f-b0d8-f3a7e0b4f147
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,863
supabase-export-v2
15cf742221efc2af
Broadly speaking, ``d.strftime(fmt)`` acts like the :mod:`time` module's ``time.strftime(fmt, d.timetuple())`` although not all objects support a :meth:`~date.timetuple` method. For the :meth:`.datetime.strptime` and :meth:`.date.strptime` class methods, the default value is ``1900-01-01T00:00:00.000``: any components ...
trusted_official_docs
CPython Docs
Broadly speaking, ``d.strftime(fmt)`` acts like the :mod:`time` module's ``time.strftime(fmt, d.timetuple())`` although not all objects support a :meth:`~date.timetuple` method. For the :meth:`.datetime.strptime` and :meth:`.date.strptime` class methods, the default value is ``1900-01-01T00:00:00.000``: any components ...
Broadly speaking, ``d.strftime(fmt)`` acts like the :mod:`time` module's ``time.strftime(fmt, d.timetuple())`` although not all objects support a :meth:`~date.timetuple` method. For the :meth:`.datetime.strptime` and :meth:`.date.strptime` class methods, the default value is ``1900-01-01T00:00:00.000``: any components ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0f8db6df-7bbe-4a4e-abeb-00818ec6002b
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,885
supabase-export-v2
ac560f202786a402
right. ``%f`` is an extension to the set of format characters in the C standard (but implemented separately in datetime objects, and therefore always available). (6) For a naive object, the ``%z``, ``%:z`` and ``%Z`` format codes are replaced by empty strings.
trusted_official_docs
CPython Docs
right. ``%f`` is an extension to the set of format characters in the C standard (but implemented separately in datetime objects, and therefore always available). (6) For a naive object, the ``%z``, ``%:z`` and ``%Z`` format codes are replaced by empty strings.
right. ``%f`` is an extension to the set of format characters in the C standard (but implemented separately in datetime objects, and therefore always available). (6) For a naive object, the ``%z``, ``%:z`` and ``%Z`` format codes are replaced by empty strings.
python, official-docs, cpython, P0
Local_Trusted_Corpus
122def8e-4833-4847-923b-b01a0a04d10f
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,733
supabase-export-v2
9a850dbdad88f1cb
.. method:: time.__format__(format) Same as :meth:`.time.strftime`. This makes it possible to specify a format string for a :class:`.time` object in :ref:`formatted string literals <f-strings>` and when using :meth:`str.format`. See also :ref:`strftime-strptime-behavior` and :meth:`time.isoformat`.
trusted_official_docs
CPython Docs
.. method:: time.__format__(format) Same as :meth:`.time.strftime`. This makes it possible to specify a format string for a :class:`.time` object in :ref:`formatted string literals <f-strings>` and when using :meth:`str.format`. See also :ref:`strftime-strptime-behavior` and :meth:`time.isoformat`.
.. method:: time.__format__(format) Same as :meth:`.time.strftime`. This makes it possible to specify a format string for a :class:`.time` object in :ref:`formatted string literals <f-strings>` and when using :meth:`str.format`. See also :ref:`strftime-strptime-behavior` and :meth:`time.isoformat`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
127d7e52-151a-413d-8d06-e802185b17aa
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,448
supabase-export-v2
9c71c33753049e37
d.ctime() 'Mon Mar 11 00:00:00 2002' >>> 'The {1} is {0:%d}, the {2} is {0:%B}.'.format(d, "day", "month") 'The day is 11, the month is March.' >>> # Methods for extracting 'components' under different calendars >>> t = d.timetuple() >>> for i in t: # doctest: +SKIP ... print(i) 2002 # year 3 # month 11 # day 0 ...
trusted_official_docs
CPython Docs
d.ctime() 'Mon Mar 11 00:00:00 2002' >>> 'The {1} is {0:%d}, the {2} is {0:%B}.'.format(d, "day", "month") 'The day is 11, the month is March.' >>> # Methods for extracting 'components' under different calendars >>> t = d.timetuple() >>> for i in t: # doctest: +SKIP ... print(i) 2002 # year 3 # month 11 # day 0 ...
d.ctime() 'Mon Mar 11 00:00:00 2002' >>> 'The {1} is {0:%d}, the {2} is {0:%B}.'.format(d, "day", "month") 'The day is 11, the month is March.' >>> # Methods for extracting 'components' under different calendars >>> t = d.timetuple() >>> for i in t: # doctest: +SKIP ... print(i) 2002 # year 3 # month 11 # day 0 ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
128c7bd3-8c12-4e8e-92d7-25c29ba8cd77
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,310
supabase-export-v2
20d938cbedfbe9ba
Difference of ``t2`` and ``t3``. Afterwards | | | ``t1 == t2 - t3`` and ``t2 == t1 + t3`` are | | | true. (1)(6) | +--------------------------------+-----------------------------------------------+ | ``t1 = t2 * i or t1 = i * t2`` | Delta multiplied by an integer. | | | Afterwards ``t1 // i == t2`` is true, | | | provi...
trusted_official_docs
CPython Docs
Difference of ``t2`` and ``t3``. Afterwards | | | ``t1 == t2 - t3`` and ``t2 == t1 + t3`` are | | | true. (1)(6) | +--------------------------------+-----------------------------------------------+ | ``t1 = t2 * i or t1 = i * t2`` | Delta multiplied by an integer. | | | Afterwards ``t1 // i == t2`` is true, | | | provi...
Difference of ``t2`` and ``t3``. Afterwards | | | ``t1 == t2 - t3`` and ``t2 == t1 + t3`` are | | | true. (1)(6) | +--------------------------------+-----------------------------------------------+ | ``t1 = t2 * i or t1 = i * t2`` | Delta multiplied by an integer. | | | Afterwards ``t1 // i == t2`` is true, | | | provi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
12f1db2b-d18c-4712-b0d0-59b6c8d56756
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,780
supabase-export-v2
9943afad162eba27
directly. The intent is that the :class:`!tzinfo` methods interpret *dt* as being in local time, and not need worry about objects in other time zones. There is one more :class:`tzinfo` method that a subclass may wish to override:
trusted_official_docs
CPython Docs
directly. The intent is that the :class:`!tzinfo` methods interpret *dt* as being in local time, and not need worry about objects in other time zones. There is one more :class:`tzinfo` method that a subclass may wish to override:
directly. The intent is that the :class:`!tzinfo` methods interpret *dt* as being in local time, and not need worry about objects in other time zones. There is one more :class:`tzinfo` method that a subclass may wish to override:
python, official-docs, cpython, P0
Local_Trusted_Corpus
137141e3-993d-4008-bca5-f806ce22a7aa
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,482
supabase-export-v2
447fbf153f853010
.. classmethod:: datetime.fromtimestamp(timestamp, tz=None) Return the local date and time corresponding to the POSIX timestamp, such as is returned by :func:`time.time`. If optional argument *tz* is ``None`` or not specified, the timestamp is converted to the platform's local date and time, and the returned :class:...
trusted_official_docs
CPython Docs
.. classmethod:: datetime.fromtimestamp(timestamp, tz=None) Return the local date and time corresponding to the POSIX timestamp, such as is returned by :func:`time.time`. If optional argument *tz* is ``None`` or not specified, the timestamp is converted to the platform's local date and time, and the returned :class:...
.. classmethod:: datetime.fromtimestamp(timestamp, tz=None) Return the local date and time corresponding to the POSIX timestamp, such as is returned by :func:`time.time`. If optional argument *tz* is ``None`` or not specified, the timestamp is converted to the platform's local date and time, and the returned :class:...
python, official-docs, cpython, P0
Local_Trusted_Corpus
15c92d9a-6c00-444a-b516-8783a13a669e
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,638
supabase-export-v2
426862442b0414c1
>>> import datetime as dt >>> dt.datetime.now().isoformat(timespec='minutes') # doctest: +SKIP '2002-12-25T00:00' >>> my_datetime = dt.datetime(2015, 1, 1, 12, 30, 59, 0) >>> my_datetime.isoformat(timespec='microseconds') '2015-01-01T12:30:59.000000' .. versionchanged:: 3.6 Added the *timespec* parameter.
trusted_official_docs
CPython Docs
>>> import datetime as dt >>> dt.datetime.now().isoformat(timespec='minutes') # doctest: +SKIP '2002-12-25T00:00' >>> my_datetime = dt.datetime(2015, 1, 1, 12, 30, 59, 0) >>> my_datetime.isoformat(timespec='microseconds') '2015-01-01T12:30:59.000000' .. versionchanged:: 3.6 Added the *timespec* parameter.
>>> import datetime as dt >>> dt.datetime.now().isoformat(timespec='minutes') # doctest: +SKIP '2002-12-25T00:00' >>> my_datetime = dt.datetime(2015, 1, 1, 12, 30, 59, 0) >>> my_datetime.isoformat(timespec='microseconds') '2015-01-01T12:30:59.000000' .. versionchanged:: 3.6 Added the *timespec* parameter.
python, official-docs, cpython, P0
Local_Trusted_Corpus
16637631-8cd0-440c-b11e-d5e661d8160d
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,739
supabase-export-v2
2ef69ebd1e502532
returns ``None``, else returns ``self.tzinfo.dst(None)``, and raises an exception if the latter doesn't return ``None``, or a :class:`timedelta` object with magnitude less than one day. .. versionchanged:: 3.7 The DST offset is not restricted to a whole number of minutes.
trusted_official_docs
CPython Docs
returns ``None``, else returns ``self.tzinfo.dst(None)``, and raises an exception if the latter doesn't return ``None``, or a :class:`timedelta` object with magnitude less than one day. .. versionchanged:: 3.7 The DST offset is not restricted to a whole number of minutes.
returns ``None``, else returns ``self.tzinfo.dst(None)``, and raises an exception if the latter doesn't return ``None``, or a :class:`timedelta` object with magnitude less than one day. .. versionchanged:: 3.7 The DST offset is not restricted to a whole number of minutes.
python, official-docs, cpython, P0
Local_Trusted_Corpus
17881925-e028-4b06-90f2-470b617e23ca
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,329
supabase-export-v2
c520d303ac4c1749
.. method:: timedelta.total_seconds() Return the total number of seconds contained in the duration. Equivalent to ``td / timedelta(seconds=1)``. For interval units other than seconds, use the division form directly (for example, ``td / timedelta(microseconds=1)``).
trusted_official_docs
CPython Docs
.. method:: timedelta.total_seconds() Return the total number of seconds contained in the duration. Equivalent to ``td / timedelta(seconds=1)``. For interval units other than seconds, use the division form directly (for example, ``td / timedelta(microseconds=1)``).
.. method:: timedelta.total_seconds() Return the total number of seconds contained in the duration. Equivalent to ``td / timedelta(seconds=1)``. For interval units other than seconds, use the division form directly (for example, ``td / timedelta(microseconds=1)``).
python, official-docs, cpython, P0
Local_Trusted_Corpus
18f46c86-562e-44cd-98b4-0f9a9bc9f79c
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,217
supabase-export-v2
f9a211c05f792427
The :mod:`!datetime` module supplies classes for manipulating dates and times. While date and time arithmetic is supported, the focus of the implementation is on efficient attribute extraction for output formatting and manipulation.
trusted_official_docs
CPython Docs
The :mod:`!datetime` module supplies classes for manipulating dates and times. While date and time arithmetic is supported, the focus of the implementation is on efficient attribute extraction for output formatting and manipulation.
The :mod:`!datetime` module supplies classes for manipulating dates and times. While date and time arithmetic is supported, the focus of the implementation is on efficient attribute extraction for output formatting and manipulation.
python, official-docs, cpython, P0
Local_Trusted_Corpus
1a860bd6-9f02-457d-8a16-4141fdf9618f
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,343
supabase-export-v2
f358b5f1988aadc4
All arguments are required. Arguments must be integers, in the following ranges: * ``MINYEAR <= year <= MAXYEAR`` * ``1 <= month <= 12`` * ``1 <= day <= number of days in the given month and year``
trusted_official_docs
CPython Docs
All arguments are required. Arguments must be integers, in the following ranges: * ``MINYEAR <= year <= MAXYEAR`` * ``1 <= month <= 12`` * ``1 <= day <= number of days in the given month and year``
All arguments are required. Arguments must be integers, in the following ranges: * ``MINYEAR <= year <= MAXYEAR`` * ``1 <= month <= 12`` * ``1 <= day <= number of days in the given month and year``
python, official-docs, cpython, P0
Local_Trusted_Corpus
1b8c31f5-6b02-48a6-949c-84845f9d9e33
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,678
supabase-export-v2
066cf5658490fd73
.. class:: time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0) All arguments are optional. *tzinfo* may be ``None``, or an instance of a :class:`tzinfo` subclass. The remaining arguments must be integers in the following ranges:
trusted_official_docs
CPython Docs
.. class:: time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0) All arguments are optional. *tzinfo* may be ``None``, or an instance of a :class:`tzinfo` subclass. The remaining arguments must be integers in the following ranges:
.. class:: time(hour=0, minute=0, second=0, microsecond=0, tzinfo=None, *, fold=0) All arguments are optional. *tzinfo* may be ``None``, or an instance of a :class:`tzinfo` subclass. The remaining arguments must be integers in the following ranges:
python, official-docs, cpython, P0
Local_Trusted_Corpus
1ee45869-6ea1-4db9-aa76-88fbf60aaf31
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,551
supabase-export-v2
2c1347477b1934bc
addition, the result has the same :attr:`~.datetime.tzinfo` attribute as the input datetime, and no time zone adjustments are done even if the input is aware. (3) Subtraction of a :class:`.datetime` from a :class:`!datetime` is defined only if both operands are naive, or if both are aware. If one is aware and the oth...
trusted_official_docs
CPython Docs
addition, the result has the same :attr:`~.datetime.tzinfo` attribute as the input datetime, and no time zone adjustments are done even if the input is aware. (3) Subtraction of a :class:`.datetime` from a :class:`!datetime` is defined only if both operands are naive, or if both are aware. If one is aware and the oth...
addition, the result has the same :attr:`~.datetime.tzinfo` attribute as the input datetime, and no time zone adjustments are done even if the input is aware. (3) Subtraction of a :class:`.datetime` from a :class:`!datetime` is defined only if both operands are naive, or if both are aware. If one is aware and the oth...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1f1f2c1c-b5f7-43f3-8172-2c1ec20c4807
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,795
supabase-export-v2
316bc0a24c9cc9b3
'UTC =', t.time(), t.tzname()) ... 05:00:00 UTC = 00:00:00 EST 06:00:00 UTC = 01:00:00 EST 07:00:00 UTC = 03:00:00 EDT 08:00:00 UTC = 04:00:00 EDT When DST ends (the "end" line), there's a potentially worse problem: there's an hour that can't be spelled unambiguously in local wall time: the last hour of daylight time. ...
trusted_official_docs
CPython Docs
'UTC =', t.time(), t.tzname()) ... 05:00:00 UTC = 00:00:00 EST 06:00:00 UTC = 01:00:00 EST 07:00:00 UTC = 03:00:00 EDT 08:00:00 UTC = 04:00:00 EDT When DST ends (the "end" line), there's a potentially worse problem: there's an hour that can't be spelled unambiguously in local wall time: the last hour of daylight time. ...
'UTC =', t.time(), t.tzname()) ... 05:00:00 UTC = 00:00:00 EST 06:00:00 UTC = 01:00:00 EST 07:00:00 UTC = 03:00:00 EDT 08:00:00 UTC = 04:00:00 EDT When DST ends (the "end" line), there's a potentially worse problem: there's an hour that can't be spelled unambiguously in local wall time: the last hour of daylight time. ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
1f997dcb-9cd8-438e-b088-3fbe1ba13700
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,285
supabase-export-v2
3d3d641918b6ec17
rounded to the nearest microsecond using round-half-to-even tiebreaker. If no argument is a float, the conversion and normalization processes are exact (no information is lost). If the normalized value of days lies outside the indicated range, :exc:`OverflowError` is raised.
trusted_official_docs
CPython Docs
rounded to the nearest microsecond using round-half-to-even tiebreaker. If no argument is a float, the conversion and normalization processes are exact (no information is lost). If the normalized value of days lies outside the indicated range, :exc:`OverflowError` is raised.
rounded to the nearest microsecond using round-half-to-even tiebreaker. If no argument is a float, the conversion and normalization processes are exact (no information is lost). If the normalized value of days lies outside the indicated range, :exc:`OverflowError` is raised.
python, official-docs, cpython, P0
Local_Trusted_Corpus
1fa77325-f82b-421d-b865-e0969a2b4c63
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,793
supabase-export-v2
2d6f2a3fec731644
end 23:MM 0:MM 1:MM 1:MM 2:MM 3:MM When DST starts (the "start" line), the local wall clock leaps from 1:59 to 3:00. A wall time of the form 2:MM doesn't really make sense on that day, so ``astimezone(Eastern)`` won't deliver a result with ``hour == 2`` on the day DST begins. For example, at the Spring forward transiti...
trusted_official_docs
CPython Docs
end 23:MM 0:MM 1:MM 1:MM 2:MM 3:MM When DST starts (the "start" line), the local wall clock leaps from 1:59 to 3:00. A wall time of the form 2:MM doesn't really make sense on that day, so ``astimezone(Eastern)`` won't deliver a result with ``hour == 2`` on the day DST begins. For example, at the Spring forward transiti...
end 23:MM 0:MM 1:MM 1:MM 2:MM 3:MM When DST starts (the "start" line), the local wall clock leaps from 1:59 to 3:00. A wall time of the form 2:MM doesn't really make sense on that day, so ``astimezone(Eastern)`` won't deliver a result with ``hour == 2`` on the day DST begins. For example, at the Spring forward transiti...
python, official-docs, cpython, P0
Local_Trusted_Corpus
209e9f19-2eec-423b-a8fa-52ec46a6aa37
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,416
supabase-export-v2
20c9118db6792fc1
.. method:: date.weekday() Return the day of the week as an integer, where Monday is 0 and Sunday is 6. For example, ``date(2002, 12, 4).weekday() == 2``, a Wednesday. See also :meth:`isoweekday`.
trusted_official_docs
CPython Docs
.. method:: date.weekday() Return the day of the week as an integer, where Monday is 0 and Sunday is 6. For example, ``date(2002, 12, 4).weekday() == 2``, a Wednesday. See also :meth:`isoweekday`.
.. method:: date.weekday() Return the day of the week as an integer, where Monday is 0 and Sunday is 6. For example, ``date(2002, 12, 4).weekday() == 2``, a Wednesday. See also :meth:`isoweekday`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
20b61e4e-2f82-40a2-be05-96cdc8c7865f
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,798
supabase-export-v2
30a664b0c2083488
Note that the :class:`.datetime` instances that differ only by the value of the :attr:`~.datetime.fold` attribute are considered equal in comparisons. Applications that can't bear wall-time ambiguities should explicitly check the value of the :attr:`~.datetime.fold` attribute or avoid using hybrid :class:`tzinfo` subcl...
trusted_official_docs
CPython Docs
Note that the :class:`.datetime` instances that differ only by the value of the :attr:`~.datetime.fold` attribute are considered equal in comparisons. Applications that can't bear wall-time ambiguities should explicitly check the value of the :attr:`~.datetime.fold` attribute or avoid using hybrid :class:`tzinfo` subcl...
Note that the :class:`.datetime` instances that differ only by the value of the :attr:`~.datetime.fold` attribute are considered equal in comparisons. Applications that can't bear wall-time ambiguities should explicitly check the value of the :attr:`~.datetime.fold` attribute or avoid using hybrid :class:`tzinfo` subcl...
python, official-docs, cpython, P0
Local_Trusted_Corpus
221b1b8c-8e2a-4f57-bd2a-03d5c42ac1e6
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,284
supabase-export-v2
b43cc4d0f31383fa
of ``import datetime`` or ``from datetime import datetime`` to avoid confusion between the module and the class. See `How I Import Python’s datetime Module <https://adamj.eu/tech/2019/09/12/how-i-import-pythons-datetime-module/>`__. If any argument is a float and there are fractional microseconds, the fractional micro...
trusted_official_docs
CPython Docs
of ``import datetime`` or ``from datetime import datetime`` to avoid confusion between the module and the class. See `How I Import Python’s datetime Module <https://adamj.eu/tech/2019/09/12/how-i-import-pythons-datetime-module/>`__. If any argument is a float and there are fractional microseconds, the fractional micro...
of ``import datetime`` or ``from datetime import datetime`` to avoid confusion between the module and the class. See `How I Import Python’s datetime Module <https://adamj.eu/tech/2019/09/12/how-i-import-pythons-datetime-module/>`__. If any argument is a float and there are fractional microseconds, the fractional micro...
python, official-docs, cpython, P0
Local_Trusted_Corpus
24015b3e-3806-41e6-a9c6-a9be482e5973
CPython Docs
file://datasets/cpython/Doc/library/datetime.rst
unknown
821ecadd-5a9b-4ba2-a0f4-7999c584a5c7
25,262
supabase-export-v2
b7c8e2cb3711452c
these types are :term:`hashable`, meaning that they can be used as dictionary keys. - Objects of these types support efficient pickling via the :mod:`pickle` module. Determining if an object is aware or naive ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
trusted_official_docs
CPython Docs
these types are :term:`hashable`, meaning that they can be used as dictionary keys. - Objects of these types support efficient pickling via the :mod:`pickle` module. Determining if an object is aware or naive ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
these types are :term:`hashable`, meaning that they can be used as dictionary keys. - Objects of these types support efficient pickling via the :mod:`pickle` module. Determining if an object is aware or naive ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
python, official-docs, cpython, P0
Local_Trusted_Corpus