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
56fa27d5-9f77-497c-adb8-7e29ecaa175d
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,551
supabase-export-v2
1cd1b4e1f666be12
Sets or resets the time zone search path (:data:`TZPATH`) for the module. When called with no arguments, :data:`TZPATH` is set to the default value. Calling ``reset_tzpath`` will not invalidate the :class:`ZoneInfo` cache, and so calls to the primary ``ZoneInfo`` constructor will only use the new ``TZPATH`` in the ca...
trusted_official_docs
CPython Docs
Sets or resets the time zone search path (:data:`TZPATH`) for the module. When called with no arguments, :data:`TZPATH` is set to the default value. Calling ``reset_tzpath`` will not invalidate the :class:`ZoneInfo` cache, and so calls to the primary ``ZoneInfo`` constructor will only use the new ``TZPATH`` in the ca...
Sets or resets the time zone search path (:data:`TZPATH`) for the module. When called with no arguments, :data:`TZPATH` is set to the default value. Calling ``reset_tzpath`` will not invalidate the :class:`ZoneInfo` cache, and so calls to the primary ``ZoneInfo`` constructor will only use the new ``TZPATH`` in the ca...
python, official-docs, cpython, P0
Local_Trusted_Corpus
623edfbe-3d17-43fb-b9aa-ae3fdda6ee40
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,455
supabase-export-v2
e4f50b126399b980
Module: :mod:`datetime` Provides the :class:`~datetime.time` and :class:`~datetime.datetime` types with which the :class:`ZoneInfo` class is designed to be used. Package :pypi:`tzdata` First-party package maintained by the CPython core developers to supply time zone data via PyPI.
trusted_official_docs
CPython Docs
Module: :mod:`datetime` Provides the :class:`~datetime.time` and :class:`~datetime.datetime` types with which the :class:`ZoneInfo` class is designed to be used. Package :pypi:`tzdata` First-party package maintained by the CPython core developers to supply time zone data via PyPI.
Module: :mod:`datetime` Provides the :class:`~datetime.time` and :class:`~datetime.datetime` types with which the :class:`ZoneInfo` class is designed to be used. Package :pypi:`tzdata` First-party package maintained by the CPython core developers to supply time zone data via PyPI.
python, official-docs, cpython, P0
Local_Trusted_Corpus
6e9b24e6-265b-45ce-925c-3760292d56ba
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,556
supabase-export-v2
cba716765f3a08b2
``TZPATH`` may contain only absolute paths, never relative paths, regardless of how it is configured. The object that ``zoneinfo.TZPATH`` points to may change in response to a call to :func:`reset_tzpath`, so it is recommended to use ``zoneinfo.TZPATH`` rather than importing ``TZPATH`` from ``zoneinfo`` or assigning...
trusted_official_docs
CPython Docs
``TZPATH`` may contain only absolute paths, never relative paths, regardless of how it is configured. The object that ``zoneinfo.TZPATH`` points to may change in response to a call to :func:`reset_tzpath`, so it is recommended to use ``zoneinfo.TZPATH`` rather than importing ``TZPATH`` from ``zoneinfo`` or assigning...
``TZPATH`` may contain only absolute paths, never relative paths, regardless of how it is configured. The object that ``zoneinfo.TZPATH`` points to may change in response to a call to :func:`reset_tzpath`, so it is recommended to use ``zoneinfo.TZPATH`` rather than importing ``TZPATH`` from ``zoneinfo`` or assigning...
python, official-docs, cpython, P0
Local_Trusted_Corpus
75583939-6d67-4de1-904a-bbb4de84d20b
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,528
supabase-export-v2
cd15301c5bf691e4
>>> when = dt.datetime(2020, 4, 1, 3, 15, tzinfo=zone) >>> f"{when.isoformat()} [{when.tzinfo}]" '2020-04-01T03:15:00+12:00 [Pacific/Kwajalein]' For objects constructed from a file without specifying a ``key`` parameter, ``str`` falls back to calling :func:`repr`. ``ZoneInfo``'s ``repr`` is implementation-defined and n...
trusted_official_docs
CPython Docs
>>> when = dt.datetime(2020, 4, 1, 3, 15, tzinfo=zone) >>> f"{when.isoformat()} [{when.tzinfo}]" '2020-04-01T03:15:00+12:00 [Pacific/Kwajalein]' For objects constructed from a file without specifying a ``key`` parameter, ``str`` falls back to calling :func:`repr`. ``ZoneInfo``'s ``repr`` is implementation-defined and n...
>>> when = dt.datetime(2020, 4, 1, 3, 15, tzinfo=zone) >>> f"{when.isoformat()} [{when.tzinfo}]" '2020-04-01T03:15:00+12:00 [Pacific/Kwajalein]' For objects constructed from a file without specifying a ``key`` parameter, ``str`` falls back to calling :func:`repr`. ``ZoneInfo``'s ``repr`` is implementation-defined and n...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7669df29-d936-426b-8f07-b43008bef255
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,543
supabase-export-v2
6d312ae48140979a
.. function:: available_timezones() Get a set containing all the valid keys for IANA time zones available anywhere on the time zone path. This is recalculated on every call to the function.
trusted_official_docs
CPython Docs
.. function:: available_timezones() Get a set containing all the valid keys for IANA time zones available anywhere on the time zone path. This is recalculated on every call to the function.
.. function:: available_timezones() Get a set containing all the valid keys for IANA time zones available anywhere on the time zone path. This is recalculated on every call to the function.
python, official-docs, cpython, P0
Local_Trusted_Corpus
88886f8e-f64f-403f-8d2d-76b836dc723a
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,552
supabase-export-v2
e4333f3078858561
invalidate the :class:`ZoneInfo` cache, and so calls to the primary ``ZoneInfo`` constructor will only use the new ``TZPATH`` in the case of a cache miss. The ``to`` parameter must be a :term:`sequence` of strings or :class:`os.PathLike` and not a string, all of which must be absolute paths. :exc:`ValueError` will be ...
trusted_official_docs
CPython Docs
invalidate the :class:`ZoneInfo` cache, and so calls to the primary ``ZoneInfo`` constructor will only use the new ``TZPATH`` in the case of a cache miss. The ``to`` parameter must be a :term:`sequence` of strings or :class:`os.PathLike` and not a string, all of which must be absolute paths. :exc:`ValueError` will be ...
invalidate the :class:`ZoneInfo` cache, and so calls to the primary ``ZoneInfo`` constructor will only use the new ``TZPATH`` in the case of a cache miss. The ``to`` parameter must be a :term:`sequence` of strings or :class:`os.PathLike` and not a string, all of which must be absolute paths. :exc:`ValueError` will be ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
91382533-6738-4f16-a78d-c77e11fa3606
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,557
supabase-export-v2
725fcb8ca9c32ec2
to a call to :func:`reset_tzpath`, so it is recommended to use ``zoneinfo.TZPATH`` rather than importing ``TZPATH`` from ``zoneinfo`` or assigning a long-lived variable to ``zoneinfo.TZPATH``. For more information on configuring the time zone search path, see :ref:`zoneinfo_data_configuration`.
trusted_official_docs
CPython Docs
to a call to :func:`reset_tzpath`, so it is recommended to use ``zoneinfo.TZPATH`` rather than importing ``TZPATH`` from ``zoneinfo`` or assigning a long-lived variable to ``zoneinfo.TZPATH``. For more information on configuring the time zone search path, see :ref:`zoneinfo_data_configuration`.
to a call to :func:`reset_tzpath`, so it is recommended to use ``zoneinfo.TZPATH`` rather than importing ``TZPATH`` from ``zoneinfo`` or assigning a long-lived variable to ``zoneinfo.TZPATH``. For more information on configuring the time zone search path, see :ref:`zoneinfo_data_configuration`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
9b883f72-9a9e-4ce4-afdf-163afb66a3b0
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,511
supabase-export-v2
99bee72593a9e18a
Using this constructor may change the semantics of your datetimes in surprising ways, only use it if you know that you need to. The following class methods are also available:
trusted_official_docs
CPython Docs
Using this constructor may change the semantics of your datetimes in surprising ways, only use it if you know that you need to. The following class methods are also available:
Using this constructor may change the semantics of your datetimes in surprising ways, only use it if you know that you need to. The following class methods are also available:
python, official-docs, cpython, P0
Local_Trusted_Corpus
a12178bc-1ee7-417e-87fa-8ffe8d74cac0
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,506
supabase-export-v2
36bd968524eb81e3
.. classmethod:: ZoneInfo.no_cache(key) An alternate constructor that bypasses the constructor's cache. It is identical to the primary constructor, but returns a new object on each call. This is most likely to be useful for testing or demonstration purposes, but it can also be used to create a system with a differen...
trusted_official_docs
CPython Docs
.. classmethod:: ZoneInfo.no_cache(key) An alternate constructor that bypasses the constructor's cache. It is identical to the primary constructor, but returns a new object on each call. This is most likely to be useful for testing or demonstration purposes, but it can also be used to create a system with a differen...
.. classmethod:: ZoneInfo.no_cache(key) An alternate constructor that bypasses the constructor's cache. It is identical to the primary constructor, but returns a new object on each call. This is most likely to be useful for testing or demonstration purposes, but it can also be used to create a system with a differen...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b87658c7-1b9e-4a7f-8223-279668c3f810
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,531
supabase-export-v2
a8be527ede448b28
Pickle serialization ******************** Rather than serializing all transition data, ``ZoneInfo`` objects are serialized by key, and ``ZoneInfo`` objects constructed from files (even those with a value for ``key`` specified) cannot be pickled.
trusted_official_docs
CPython Docs
Pickle serialization ******************** Rather than serializing all transition data, ``ZoneInfo`` objects are serialized by key, and ``ZoneInfo`` objects constructed from files (even those with a value for ``key`` specified) cannot be pickled.
Pickle serialization ******************** Rather than serializing all transition data, ``ZoneInfo`` objects are serialized by key, and ``ZoneInfo`` objects constructed from files (even those with a value for ``key`` specified) cannot be pickled.
python, official-docs, cpython, P0
Local_Trusted_Corpus
c1a120e9-6822-4b55-be56-ddeb82615a73
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,487
supabase-export-v2
ab8b86e359e5c698
.. envvar:: PYTHONTZPATH This is an :data:`os.pathsep`-separated string containing the time zone search path to use. It must consist of only absolute rather than relative paths. Relative components specified in ``PYTHONTZPATH`` will not be used, but otherwise the behavior when a relative path is specified is implem...
trusted_official_docs
CPython Docs
.. envvar:: PYTHONTZPATH This is an :data:`os.pathsep`-separated string containing the time zone search path to use. It must consist of only absolute rather than relative paths. Relative components specified in ``PYTHONTZPATH`` will not be used, but otherwise the behavior when a relative path is specified is implem...
.. envvar:: PYTHONTZPATH This is an :data:`os.pathsep`-separated string containing the time zone search path to use. It must consist of only absolute rather than relative paths. Relative components specified in ``PYTHONTZPATH`` will not be used, but otherwise the behavior when a relative path is specified is implem...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c2216605-61a7-4bff-a99d-c2fe65b04f82
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,478
supabase-export-v2
a58bae022762acea
:data:`TZPATH` for a file matching ``key``, and on failure looks for a match in the tzdata package. This behavior can be configured in three ways: 1. The default :data:`TZPATH` when not otherwise specified can be configured at :ref:`compile time <zoneinfo_data_compile_time_config>`. 2. :data:`TZPATH` can be configured...
trusted_official_docs
CPython Docs
:data:`TZPATH` for a file matching ``key``, and on failure looks for a match in the tzdata package. This behavior can be configured in three ways: 1. The default :data:`TZPATH` when not otherwise specified can be configured at :ref:`compile time <zoneinfo_data_compile_time_config>`. 2. :data:`TZPATH` can be configured...
:data:`TZPATH` for a file matching ``key``, and on failure looks for a match in the tzdata package. This behavior can be configured in three ways: 1. The default :data:`TZPATH` when not otherwise specified can be configured at :ref:`compile time <zoneinfo_data_compile_time_config>`. 2. :data:`TZPATH` can be configured...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c44ebf11-37be-489a-bd1a-f6e5fbdbf9cf
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,520
supabase-export-v2
ad7ac09fcd79fa32
.. attribute:: ZoneInfo.key This is a read-only :term:`attribute` that returns the value of ``key`` passed to the constructor, which should be a lookup key in the IANA time zone database (e.g. ``America/New_York``, ``Europe/Paris`` or ``Asia/Tokyo``).
trusted_official_docs
CPython Docs
.. attribute:: ZoneInfo.key This is a read-only :term:`attribute` that returns the value of ``key`` passed to the constructor, which should be a lookup key in the IANA time zone database (e.g. ``America/New_York``, ``Europe/Paris`` or ``Asia/Tokyo``).
.. attribute:: ZoneInfo.key This is a read-only :term:`attribute` that returns the value of ``key`` passed to the constructor, which should be a lookup key in the IANA time zone database (e.g. ``America/New_York``, ``Europe/Paris`` or ``Asia/Tokyo``).
python, official-docs, cpython, P0
Local_Trusted_Corpus
d078b451-7ffa-4a61-beb7-d3e9706d49bf
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,458
supabase-export-v2
9c509d3e80fb2597
Using ``ZoneInfo`` ------------------ :class:`ZoneInfo` is a concrete implementation of the :class:`datetime.tzinfo` abstract base class, and is intended to be attached to ``tzinfo``, either via the constructor, the :meth:`datetime.replace <datetime.datetime.replace>` method or :meth:`datetime.astimezone <datetime.date...
trusted_official_docs
CPython Docs
Using ``ZoneInfo`` ------------------ :class:`ZoneInfo` is a concrete implementation of the :class:`datetime.tzinfo` abstract base class, and is intended to be attached to ``tzinfo``, either via the constructor, the :meth:`datetime.replace <datetime.datetime.replace>` method or :meth:`datetime.astimezone <datetime.date...
Using ``ZoneInfo`` ------------------ :class:`ZoneInfo` is a concrete implementation of the :class:`datetime.tzinfo` abstract base class, and is intended to be attached to ``tzinfo``, either via the constructor, the :meth:`datetime.replace <datetime.datetime.replace>` method or :meth:`datetime.astimezone <datetime.date...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d0ab18d0-87dd-4149-aef3-f843ca22dc9e
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,459
supabase-export-v2
d4ea9a4b8bc3a519
of the :class:`datetime.tzinfo` abstract base class, and is intended to be attached to ``tzinfo``, either via the constructor, the :meth:`datetime.replace <datetime.datetime.replace>` method or :meth:`datetime.astimezone <datetime.datetime.astimezone>`:: >>> from zoneinfo import ZoneInfo >>> import datetime as dt
trusted_official_docs
CPython Docs
of the :class:`datetime.tzinfo` abstract base class, and is intended to be attached to ``tzinfo``, either via the constructor, the :meth:`datetime.replace <datetime.datetime.replace>` method or :meth:`datetime.astimezone <datetime.datetime.astimezone>`:: >>> from zoneinfo import ZoneInfo >>> import datetime as dt
of the :class:`datetime.tzinfo` abstract base class, and is intended to be attached to ``tzinfo``, either via the constructor, the :meth:`datetime.replace <datetime.datetime.replace>` method or :meth:`datetime.astimezone <datetime.datetime.astimezone>`:: >>> from zoneinfo import ZoneInfo >>> import datetime as dt
python, official-docs, cpython, P0
Local_Trusted_Corpus
d3b4b544-0fbd-4573-ad83-9fa533aaeec4
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,548
supabase-export-v2
a7e07724a5ce7faf
.. note:: These values are not designed to be exposed to end-users; for user facing elements, applications should use something like CLDR (the Unicode Common Locale Data Repository) to get more user-friendly strings. See also the cautionary note on :attr:`ZoneInfo.key`.
trusted_official_docs
CPython Docs
.. note:: These values are not designed to be exposed to end-users; for user facing elements, applications should use something like CLDR (the Unicode Common Locale Data Repository) to get more user-friendly strings. See also the cautionary note on :attr:`ZoneInfo.key`.
.. note:: These values are not designed to be exposed to end-users; for user facing elements, applications should use something like CLDR (the Unicode Common Locale Data Repository) to get more user-friendly strings. See also the cautionary note on :attr:`ZoneInfo.key`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d871bb02-2cec-4e90-902b-a9b40b9a1ff6
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,513
supabase-export-v2
fe1845cb06a829c1
.. classmethod:: ZoneInfo.clear_cache(*, only_keys=None) A method for invalidating the cache on the ``ZoneInfo`` class. If no arguments are passed, all caches are invalidated and the next call to the primary constructor for each key will return a new instance.
trusted_official_docs
CPython Docs
.. classmethod:: ZoneInfo.clear_cache(*, only_keys=None) A method for invalidating the cache on the ``ZoneInfo`` class. If no arguments are passed, all caches are invalidated and the next call to the primary constructor for each key will return a new instance.
.. classmethod:: ZoneInfo.clear_cache(*, only_keys=None) A method for invalidating the cache on the ``ZoneInfo`` class. If no arguments are passed, all caches are invalidated and the next call to the primary constructor for each key will return a new instance.
python, official-docs, cpython, P0
Local_Trusted_Corpus
d9a87da7-b74b-4857-abd5-e12168031b7e
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,466
supabase-export-v2
1b4102cf60db898c
>>> when_add.tzname() 'PST' These time zones also support the :attr:`~datetime.datetime.fold` attribute introduced in :pep:`495`. During offset transitions which induce ambiguous times (such as a daylight saving time to standard time transition), the offset from *before* the transition is used when ``fold=0``, and the ...
trusted_official_docs
CPython Docs
>>> when_add.tzname() 'PST' These time zones also support the :attr:`~datetime.datetime.fold` attribute introduced in :pep:`495`. During offset transitions which induce ambiguous times (such as a daylight saving time to standard time transition), the offset from *before* the transition is used when ``fold=0``, and the ...
>>> when_add.tzname() 'PST' These time zones also support the :attr:`~datetime.datetime.fold` attribute introduced in :pep:`495`. During offset transitions which induce ambiguous times (such as a daylight saving time to standard time transition), the offset from *before* the transition is used when ``fold=0``, and the ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
e9f2139e-173a-4f17-b241-a47265dc5d0d
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,497
supabase-export-v2
61df1048957969b7
a = ZoneInfo(key) b = ZoneInfo(key) assert a is b ``key`` must be in the form of a relative, normalized POSIX path, with no up-level references. The constructor will raise :exc:`ValueError` if a non-conforming key is passed.
trusted_official_docs
CPython Docs
a = ZoneInfo(key) b = ZoneInfo(key) assert a is b ``key`` must be in the form of a relative, normalized POSIX path, with no up-level references. The constructor will raise :exc:`ValueError` if a non-conforming key is passed.
a = ZoneInfo(key) b = ZoneInfo(key) assert a is b ``key`` must be in the form of a relative, normalized POSIX path, with no up-level references. The constructor will raise :exc:`ValueError` if a non-conforming key is passed.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e9f27742-5a87-4ac0-9daf-8867882d84e7
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,521
supabase-export-v2
e80759e8ca0886a3
the value of ``key`` passed to the constructor, which should be a lookup key in the IANA time zone database (e.g. ``America/New_York``, ``Europe/Paris`` or ``Asia/Tokyo``). For zones constructed from file without specifying a ``key`` parameter, this will be set to ``None``.
trusted_official_docs
CPython Docs
the value of ``key`` passed to the constructor, which should be a lookup key in the IANA time zone database (e.g. ``America/New_York``, ``Europe/Paris`` or ``Asia/Tokyo``). For zones constructed from file without specifying a ``key`` parameter, this will be set to ``None``.
the value of ``key`` passed to the constructor, which should be a lookup key in the IANA time zone database (e.g. ``America/New_York``, ``Europe/Paris`` or ``Asia/Tokyo``). For zones constructed from file without specifying a ``key`` parameter, this will be set to ``None``.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ea1eef3b-fc7c-4739-a23b-051eaf02637c
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,515
supabase-export-v2
87ea66a9dbb2dca1
the ``only_keys`` parameter, only the specified keys will be removed from the cache. Keys passed to ``only_keys`` but not found in the cache are ignored. .. TODO: Add "See `cache_behavior`_" reference when that section is ready.
trusted_official_docs
CPython Docs
the ``only_keys`` parameter, only the specified keys will be removed from the cache. Keys passed to ``only_keys`` but not found in the cache are ignored. .. TODO: Add "See `cache_behavior`_" reference when that section is ready.
the ``only_keys`` parameter, only the specified keys will be removed from the cache. Keys passed to ``only_keys`` but not found in the cache are ignored. .. TODO: Add "See `cache_behavior`_" reference when that section is ready.
python, official-docs, cpython, P0
Local_Trusted_Corpus
eb6e2935-7bd6-4935-b334-b4e8e870bca7
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,467
supabase-export-v2
84dc1bfefa6c6947
standard time transition), the offset from *before* the transition is used when ``fold=0``, and the offset *after* the transition is used when ``fold=1``, for example:: >>> when = dt.datetime(2020, 11, 1, 1, tzinfo=ZoneInfo("America/Los_Angeles")) >>> print(when) 2020-11-01 01:00:00-07:00
trusted_official_docs
CPython Docs
standard time transition), the offset from *before* the transition is used when ``fold=0``, and the offset *after* the transition is used when ``fold=1``, for example:: >>> when = dt.datetime(2020, 11, 1, 1, tzinfo=ZoneInfo("America/Los_Angeles")) >>> print(when) 2020-11-01 01:00:00-07:00
standard time transition), the offset from *before* the transition is used when ``fold=0``, and the offset *after* the transition is used when ``fold=1``, for example:: >>> when = dt.datetime(2020, 11, 1, 1, tzinfo=ZoneInfo("America/Los_Angeles")) >>> print(when) 2020-11-01 01:00:00-07:00
python, official-docs, cpython, P0
Local_Trusted_Corpus
ee980691-0da3-4d89-903c-342b2cb5c31b
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,546
supabase-export-v2
0ce9fc784b6795dd
.. caution:: This function may open a large number of files, as the best way to determine if a file on the time zone path is a valid time zone is to read the "magic string" at the beginning.
trusted_official_docs
CPython Docs
.. caution:: This function may open a large number of files, as the best way to determine if a file on the time zone path is a valid time zone is to read the "magic string" at the beginning.
.. caution:: This function may open a large number of files, as the best way to determine if a file on the time zone path is a valid time zone is to read the "magic string" at the beginning.
python, official-docs, cpython, P0
Local_Trusted_Corpus
f065b41b-2588-4ec1-99b7-3980e74cd370
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,498
supabase-export-v2
74fbcd94f55e19fe
be in the form of a relative, normalized POSIX path, with no up-level references. The constructor will raise :exc:`ValueError` if a non-conforming key is passed. If no file matching ``key`` is found, the constructor will raise :exc:`ZoneInfoNotFoundError`.
trusted_official_docs
CPython Docs
be in the form of a relative, normalized POSIX path, with no up-level references. The constructor will raise :exc:`ValueError` if a non-conforming key is passed. If no file matching ``key`` is found, the constructor will raise :exc:`ZoneInfoNotFoundError`.
be in the form of a relative, normalized POSIX path, with no up-level references. The constructor will raise :exc:`ValueError` if a non-conforming key is passed. If no file matching ``key`` is found, the constructor will raise :exc:`ZoneInfoNotFoundError`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
f0722ae9-17d8-44a2-8a8c-8abce6f4b5b0
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,517
supabase-export-v2
ca2b1785f86109dd
.. warning:: Invoking this function may change the semantics of datetimes using ``ZoneInfo`` in surprising ways; this modifies module state and thus may have wide-ranging effects. Only use it if you know that you need to.
trusted_official_docs
CPython Docs
.. warning:: Invoking this function may change the semantics of datetimes using ``ZoneInfo`` in surprising ways; this modifies module state and thus may have wide-ranging effects. Only use it if you know that you need to.
.. warning:: Invoking this function may change the semantics of datetimes using ``ZoneInfo`` in surprising ways; this modifies module state and thus may have wide-ranging effects. Only use it if you know that you need to.
python, official-docs, cpython, P0
Local_Trusted_Corpus
f3bc2ca0-7fb4-44ab-ad74-b398fb469746
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,536
supabase-export-v2
c1e4a1d2ed5d780e
>>> a = ZoneInfo("Europe/Berlin") >>> b = pickle.loads(europe_berlin_pkl) >>> a is b True 2. ``ZoneInfo.no_cache(key)``: When constructed from the cache-bypassing constructor, the ``ZoneInfo`` object is also serialized by key, but when deserialized, the deserializing process uses the cache bypassing constructor. If ...
trusted_official_docs
CPython Docs
>>> a = ZoneInfo("Europe/Berlin") >>> b = pickle.loads(europe_berlin_pkl) >>> a is b True 2. ``ZoneInfo.no_cache(key)``: When constructed from the cache-bypassing constructor, the ``ZoneInfo`` object is also serialized by key, but when deserialized, the deserializing process uses the cache bypassing constructor. If ...
>>> a = ZoneInfo("Europe/Berlin") >>> b = pickle.loads(europe_berlin_pkl) >>> a is b True 2. ``ZoneInfo.no_cache(key)``: When constructed from the cache-bypassing constructor, the ``ZoneInfo`` object is also serialized by key, but when deserialized, the deserializing process uses the cache bypassing constructor. If ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ffb3d3a3-9659-4380-ba13-f077a0e949c5
CPython Docs
file://datasets/cpython/Doc/library/zoneinfo.rst
unknown
c2d9f1e5-ab0a-4465-86be-6e2bc5771bf4
51,526
supabase-export-v2
ba3888b4e1660d27
string representation returned when calling :py:class:`str` on a :class:`ZoneInfo` object defaults to using the :attr:`ZoneInfo.key` attribute (see the note on usage in the attribute documentation):: >>> zone = ZoneInfo("Pacific/Kwajalein") >>> str(zone) 'Pacific/Kwajalein'
trusted_official_docs
CPython Docs
string representation returned when calling :py:class:`str` on a :class:`ZoneInfo` object defaults to using the :attr:`ZoneInfo.key` attribute (see the note on usage in the attribute documentation):: >>> zone = ZoneInfo("Pacific/Kwajalein") >>> str(zone) 'Pacific/Kwajalein'
string representation returned when calling :py:class:`str` on a :class:`ZoneInfo` object defaults to using the :attr:`ZoneInfo.key` attribute (see the note on usage in the attribute documentation):: >>> zone = ZoneInfo("Pacific/Kwajalein") >>> str(zone) 'Pacific/Kwajalein'
python, official-docs, cpython, P0
Local_Trusted_Corpus
843ec013-01d5-42d8-8cf4-5699dddd445d
CPython Docs
file://datasets/cpython/Doc/library/development.rst
unknown
62a4758d-5bde-4eaf-bc6a-f13beb9ca787
51,566
supabase-export-v2
8ce141527cd1fb3b
module's contents. The :mod:`doctest` and :mod:`unittest` modules contains frameworks for writing unit tests that automatically exercise code and verify that the expected output is produced. The list of modules described in this chapter is:
trusted_official_docs
CPython Docs
module's contents. The :mod:`doctest` and :mod:`unittest` modules contains frameworks for writing unit tests that automatically exercise code and verify that the expected output is produced. The list of modules described in this chapter is:
module's contents. The :mod:`doctest` and :mod:`unittest` modules contains frameworks for writing unit tests that automatically exercise code and verify that the expected output is produced. The list of modules described in this chapter is:
python, official-docs, cpython, P0
Local_Trusted_Corpus
91f3803c-a1b2-4f00-b0d9-eb364a10e1e1
CPython Docs
file://datasets/cpython/Doc/library/development.rst
unknown
62a4758d-5bde-4eaf-bc6a-f13beb9ca787
51,565
supabase-export-v2
2bce0f0e33ad5491
***************** Development Tools ***************** The modules described in this chapter help you write software. For example, the :mod:`pydoc` module takes a module and generates documentation based on the module's contents. The :mod:`doctest` and :mod:`unittest` modules contains frameworks for writing unit tests t...
trusted_official_docs
CPython Docs
***************** Development Tools ***************** The modules described in this chapter help you write software. For example, the :mod:`pydoc` module takes a module and generates documentation based on the module's contents. The :mod:`doctest` and :mod:`unittest` modules contains frameworks for writing unit tests t...
***************** Development Tools ***************** The modules described in this chapter help you write software. For example, the :mod:`pydoc` module takes a module and generates documentation based on the module's contents. The :mod:`doctest` and :mod:`unittest` modules contains frameworks for writing unit tests t...
python, official-docs, cpython, P0
Local_Trusted_Corpus
00b8be41-fe23-4d9c-8a8c-6b6e84f0871f
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,687
supabase-export-v2
dbf0eef74fc0f78e
.. method:: fold(name, value) Header folding is controlled by the :attr:`refold_source` policy setting. A value is considered to be a 'source value' if and only if it does not have a ``name`` attribute (having a ``name`` attribute means it is a header object of some sort). If a source value needs to be refolded acco...
trusted_official_docs
CPython Docs
.. method:: fold(name, value) Header folding is controlled by the :attr:`refold_source` policy setting. A value is considered to be a 'source value' if and only if it does not have a ``name`` attribute (having a ``name`` attribute means it is a header object of some sort). If a source value needs to be refolded acco...
.. method:: fold(name, value) Header folding is controlled by the :attr:`refold_source` policy setting. A value is considered to be a 'source value' if and only if it does not have a ``name`` attribute (having a ``name`` attribute means it is a header object of some sort). If a source value needs to be refolded acco...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0203b6ca-65b7-427d-ae9f-6bd775d35fd3
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,723
supabase-export-v2
8f74e7bc032b6516
.. method:: fold(name, value) Headers are folded using the :class:`~email.header.Header` folding algorithm, which preserves existing line breaks in the value, and wraps each resulting line to the ``max_line_length``. Non-ASCII binary data are CTE encoded using the ``unknown-8bit`` charset.
trusted_official_docs
CPython Docs
.. method:: fold(name, value) Headers are folded using the :class:`~email.header.Header` folding algorithm, which preserves existing line breaks in the value, and wraps each resulting line to the ``max_line_length``. Non-ASCII binary data are CTE encoded using the ``unknown-8bit`` charset.
.. method:: fold(name, value) Headers are folded using the :class:`~email.header.Header` folding algorithm, which preserves existing line breaks in the value, and wraps each resulting line to the ``max_line_length``. Non-ASCII binary data are CTE encoded using the ``unknown-8bit`` charset.
python, official-docs, cpython, P0
Local_Trusted_Corpus
04574f74-434f-4ec0-bcdf-03657c3c4104
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,595
supabase-export-v2
c571e17ef5479144
>>> compat_SMTP = policy.compat32.clone(linesep='\r\n') >>> compat_strict = policy.compat32.clone(raise_on_defect=True) >>> compat_strict_SMTP = compat_SMTP + compat_strict This operation is not commutative; that is, the order in which the objects are added matters. To illustrate::
trusted_official_docs
CPython Docs
>>> compat_SMTP = policy.compat32.clone(linesep='\r\n') >>> compat_strict = policy.compat32.clone(raise_on_defect=True) >>> compat_strict_SMTP = compat_SMTP + compat_strict This operation is not commutative; that is, the order in which the objects are added matters. To illustrate::
>>> compat_SMTP = policy.compat32.clone(linesep='\r\n') >>> compat_strict = policy.compat32.clone(raise_on_defect=True) >>> compat_strict_SMTP = compat_SMTP + compat_strict This operation is not commutative; that is, the order in which the objects are added matters. To illustrate::
python, official-docs, cpython, P0
Local_Trusted_Corpus
0c0e67b4-1469-4a07-9312-f7a8d4383707
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,604
supabase-export-v2
7f629fa4a7ff991f
.. attribute:: linesep The string to be used to terminate lines in serialized output. The default is ``\n`` because that's the internal end-of-line discipline used by Python, though ``\r\n`` is required by the RFCs.
trusted_official_docs
CPython Docs
.. attribute:: linesep The string to be used to terminate lines in serialized output. The default is ``\n`` because that's the internal end-of-line discipline used by Python, though ``\r\n`` is required by the RFCs.
.. attribute:: linesep The string to be used to terminate lines in serialized output. The default is ``\n`` because that's the internal end-of-line discipline used by Python, though ``\r\n`` is required by the RFCs.
python, official-docs, cpython, P0
Local_Trusted_Corpus
0cbf85a4-0152-44c5-b769-baa7323d9e05
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,692
supabase-export-v2
8a266f2adf3aca30
refolded, regardless of the ``refold_header`` setting, since there is no way to know whether the binary data consists of single byte characters or multibyte characters. The following instances of :class:`EmailPolicy` provide defaults suitable for specific application domains. Note that in the future the behavior of the...
trusted_official_docs
CPython Docs
refolded, regardless of the ``refold_header`` setting, since there is no way to know whether the binary data consists of single byte characters or multibyte characters. The following instances of :class:`EmailPolicy` provide defaults suitable for specific application domains. Note that in the future the behavior of the...
refolded, regardless of the ``refold_header`` setting, since there is no way to know whether the binary data consists of single byte characters or multibyte characters. The following instances of :class:`EmailPolicy` provide defaults suitable for specific application domains. Note that in the future the behavior of the...
python, official-docs, cpython, P0
Local_Trusted_Corpus
0f917ae4-8729-4029-b7cd-d5404d233777
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,593
supabase-export-v2
a86873e56a23aaae
>>> import os >>> with open('converted.txt', 'wb') as f: ... f.write(msg.as_bytes(policy=msg.policy.clone(linesep=os.linesep))) 17 Policy objects can also be combined using the addition operator, producing a policy object whose settings are a combination of the non-default values of the summed objects::
trusted_official_docs
CPython Docs
>>> import os >>> with open('converted.txt', 'wb') as f: ... f.write(msg.as_bytes(policy=msg.policy.clone(linesep=os.linesep))) 17 Policy objects can also be combined using the addition operator, producing a policy object whose settings are a combination of the non-default values of the summed objects::
>>> import os >>> with open('converted.txt', 'wb') as f: ... f.write(msg.as_bytes(policy=msg.policy.clone(linesep=os.linesep))) 17 Policy objects can also be combined using the addition operator, producing a policy object whose settings are a combination of the non-default values of the summed objects::
python, official-docs, cpython, P0
Local_Trusted_Corpus
104f3cfe-33a4-4ec4-ace0-c6ca62d2761a
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,665
supabase-export-v2
af5a86befb0febdc
using the third-party :pypi:`idna` or :pypi:`uts46` module or with :mod:`encodings.idna`. It is not possible to use a non-ASCII username ("local-part") in a mailbox when ``utf8=False``. .. versionchanged:: 3.15 Can trigger the raising of :exc:`~email.errors.HeaderWriteError`. (Earlier versions incorrectly applied :rfc...
trusted_official_docs
CPython Docs
using the third-party :pypi:`idna` or :pypi:`uts46` module or with :mod:`encodings.idna`. It is not possible to use a non-ASCII username ("local-part") in a mailbox when ``utf8=False``. .. versionchanged:: 3.15 Can trigger the raising of :exc:`~email.errors.HeaderWriteError`. (Earlier versions incorrectly applied :rfc...
using the third-party :pypi:`idna` or :pypi:`uts46` module or with :mod:`encodings.idna`. It is not possible to use a non-ASCII username ("local-part") in a mailbox when ``utf8=False``. .. versionchanged:: 3.15 Can trigger the raising of :exc:`~email.errors.HeaderWriteError`. (Earlier versions incorrectly applied :rfc...
python, official-docs, cpython, P0
Local_Trusted_Corpus
12d35c2c-3545-49b6-971d-6adf37f86caa
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,614
supabase-export-v2
1d2f2376470b501b
.. attribute:: mangle_from_ If :const:`True`, lines starting with *"From "* in the body are escaped by putting a ``>`` in front of them. This parameter is used when the message is being serialized by a generator. Default: :const:`False`.
trusted_official_docs
CPython Docs
.. attribute:: mangle_from_ If :const:`True`, lines starting with *"From "* in the body are escaped by putting a ``>`` in front of them. This parameter is used when the message is being serialized by a generator. Default: :const:`False`.
.. attribute:: mangle_from_ If :const:`True`, lines starting with *"From "* in the body are escaped by putting a ``>`` in front of them. This parameter is used when the message is being serialized by a generator. Default: :const:`False`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
1714e1b0-5aa9-4cdd-afd9-75ec3bc289c7
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,663
supabase-export-v2
0e90df2aff1d6e33
.. attribute:: utf8 If ``False``, follow :rfc:`5322`, supporting non-ASCII characters in headers by encoding them as :rfc:`2047` "encoded words". If ``True``, follow :rfc:`6532` and use ``utf-8`` encoding for headers. Messages formatted in this way may be passed to SMTP servers that support the ``SMTPUTF8`` extensi...
trusted_official_docs
CPython Docs
.. attribute:: utf8 If ``False``, follow :rfc:`5322`, supporting non-ASCII characters in headers by encoding them as :rfc:`2047` "encoded words". If ``True``, follow :rfc:`6532` and use ``utf-8`` encoding for headers. Messages formatted in this way may be passed to SMTP servers that support the ``SMTPUTF8`` extensi...
.. attribute:: utf8 If ``False``, follow :rfc:`5322`, supporting non-ASCII characters in headers by encoding them as :rfc:`2047` "encoded words". If ``True``, follow :rfc:`6532` and use ``utf-8`` encoding for headers. Messages formatted in this way may be passed to SMTP servers that support the ``SMTPUTF8`` extensi...
python, official-docs, cpython, P0
Local_Trusted_Corpus
230db804-5957-4084-928d-549e47101881
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,653
supabase-export-v2
0af10c0f3dd85ea3
the *name* with the *value* and inserting :attr:`linesep` characters at the appropriate places. See :rfc:`5322` for a discussion of the rules for folding email headers. *value* may contain surrogateescaped binary data. There should be no surrogateescaped binary data in the string returned by the method.
trusted_official_docs
CPython Docs
the *name* with the *value* and inserting :attr:`linesep` characters at the appropriate places. See :rfc:`5322` for a discussion of the rules for folding email headers. *value* may contain surrogateescaped binary data. There should be no surrogateescaped binary data in the string returned by the method.
the *name* with the *value* and inserting :attr:`linesep` characters at the appropriate places. See :rfc:`5322` for a discussion of the rules for folding email headers. *value* may contain surrogateescaped binary data. There should be no surrogateescaped binary data in the string returned by the method.
python, official-docs, cpython, P0
Local_Trusted_Corpus
26436aad-4e09-465c-8541-0a7aec9827b7
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,691
supabase-export-v2
f84729b37d2d9966
The same as :meth:`fold` if :attr:`~Policy.cte_type` is ``7bit``, except that the returned value is bytes. If :attr:`~Policy.cte_type` is ``8bit``, non-ASCII binary data is converted back into bytes. Headers with binary data are not refolded, regardless of the ``refold_header`` setting, since there is no way to know...
trusted_official_docs
CPython Docs
The same as :meth:`fold` if :attr:`~Policy.cte_type` is ``7bit``, except that the returned value is bytes. If :attr:`~Policy.cte_type` is ``8bit``, non-ASCII binary data is converted back into bytes. Headers with binary data are not refolded, regardless of the ``refold_header`` setting, since there is no way to know...
The same as :meth:`fold` if :attr:`~Policy.cte_type` is ``7bit``, except that the returned value is bytes. If :attr:`~Policy.cte_type` is ``8bit``, non-ASCII binary data is converted back into bytes. Headers with binary data are not refolded, regardless of the ``refold_header`` setting, since there is no way to know...
python, official-docs, cpython, P0
Local_Trusted_Corpus
27a28374-3ee9-4a46-8a31-3770cc6db041
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,711
supabase-export-v2
6ee1af994eb7d4e5
.. class:: Compat32(**kw) This concrete :class:`Policy` is the backward compatibility policy. It replicates the behavior of the email package in Python 3.2. The :mod:`!policy` module also defines an instance of this class, :const:`compat32`, that is used as the default policy. Thus the default behavior of the email...
trusted_official_docs
CPython Docs
.. class:: Compat32(**kw) This concrete :class:`Policy` is the backward compatibility policy. It replicates the behavior of the email package in Python 3.2. The :mod:`!policy` module also defines an instance of this class, :const:`compat32`, that is used as the default policy. Thus the default behavior of the email...
.. class:: Compat32(**kw) This concrete :class:`Policy` is the backward compatibility policy. It replicates the behavior of the email package in Python 3.2. The :mod:`!policy` module also defines an instance of this class, :const:`compat32`, that is used as the default policy. Thus the default behavior of the email...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3377a9a5-548e-4f61-a755-b0952ca92aaf
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,600
supabase-export-v2
51b03db4deb5da3b
class, plus any additional non-method properties on the concrete class. A value specified in the constructor will override the default value for the corresponding attribute. This class defines the following properties, and thus values for the following may be passed in the constructor of any policy class:
trusted_official_docs
CPython Docs
class, plus any additional non-method properties on the concrete class. A value specified in the constructor will override the default value for the corresponding attribute. This class defines the following properties, and thus values for the following may be passed in the constructor of any policy class:
class, plus any additional non-method properties on the concrete class. A value specified in the constructor will override the default value for the corresponding attribute. This class defines the following properties, and thus values for the following may be passed in the constructor of any policy class:
python, official-docs, cpython, P0
Local_Trusted_Corpus
339bd889-5f5e-4844-9c52-65a5111ef973
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,583
supabase-export-v2
a526f4d566b8f475
arguments as the class constructor and returning a new :class:`Policy` instance that is a copy of the original but with the specified attributes values changed. As an example, the following code could be used to read an email message from a file on disk and pass it to the system ``sendmail`` program on a Unix system:
trusted_official_docs
CPython Docs
arguments as the class constructor and returning a new :class:`Policy` instance that is a copy of the original but with the specified attributes values changed. As an example, the following code could be used to read an email message from a file on disk and pass it to the system ``sendmail`` program on a Unix system:
arguments as the class constructor and returning a new :class:`Policy` instance that is a copy of the original but with the specified attributes values changed. As an example, the following code could be used to read an email message from a file on disk and pass it to the system ``sendmail`` program on a Unix system:
python, official-docs, cpython, P0
Local_Trusted_Corpus
37580cc7-1ada-4b59-b404-a1fd9b66bda4
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,729
supabase-export-v2
99b279b61da07f00
.. note:: The :const:`compat32` policy should not be used as a policy for :class:`~email.message.EmailMessage` objects, and should only be used to serialize messages that were created using the :const:`compat32` policy.
trusted_official_docs
CPython Docs
.. note:: The :const:`compat32` policy should not be used as a policy for :class:`~email.message.EmailMessage` objects, and should only be used to serialize messages that were created using the :const:`compat32` policy.
.. note:: The :const:`compat32` policy should not be used as a policy for :class:`~email.message.EmailMessage` objects, and should only be used to serialize messages that were created using the :const:`compat32` policy.
python, official-docs, cpython, P0
Local_Trusted_Corpus
398119f8-6b6c-4327-8965-60675c30205f
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,636
supabase-export-v2
cb83ed9fe13ec0e5
``None``, and there are already a number of headers with the name *name* greater than or equal to the value returned, a :exc:`ValueError` is raised. Because the default behavior of ``Message.__setitem__`` is to append the value to the list of headers, it is easy to create duplicate headers without realizing it. This ...
trusted_official_docs
CPython Docs
``None``, and there are already a number of headers with the name *name* greater than or equal to the value returned, a :exc:`ValueError` is raised. Because the default behavior of ``Message.__setitem__`` is to append the value to the list of headers, it is easy to create duplicate headers without realizing it. This ...
``None``, and there are already a number of headers with the name *name* greater than or equal to the value returned, a :exc:`ValueError` is raised. Because the default behavior of ``Message.__setitem__`` is to append the value to the list of headers, it is easy to create duplicate headers without realizing it. This ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
3c7ce667-0445-4f61-b972-fa1a05463892
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,709
supabase-export-v2
b39f6d58cda373a9
a new header created, using a unicode string, and the policy will take care of converting the unicode string into the correct RFC encoded form. The header objects and their attributes are described in :mod:`~email.headerregistry`.
trusted_official_docs
CPython Docs
a new header created, using a unicode string, and the policy will take care of converting the unicode string into the correct RFC encoded form. The header objects and their attributes are described in :mod:`~email.headerregistry`.
a new header created, using a unicode string, and the policy will take care of converting the unicode string into the correct RFC encoded form. The header objects and their attributes are described in :mod:`~email.headerregistry`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
3f045119-377c-488e-931f-4df9cb76cafd
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,575
supabase-export-v2
69bf89a142c2430b
interoperate with email servers that do not themselves follow the standards, or that implement extensions you want to use in ways that violate the standards. Policy objects give the email package the flexibility to handle all these disparate use cases.
trusted_official_docs
CPython Docs
interoperate with email servers that do not themselves follow the standards, or that implement extensions you want to use in ways that violate the standards. Policy objects give the email package the flexibility to handle all these disparate use cases.
interoperate with email servers that do not themselves follow the standards, or that implement extensions you want to use in ways that violate the standards. Policy objects give the email package the flexibility to handle all these disparate use cases.
python, official-docs, cpython, P0
Local_Trusted_Corpus
40f348ae-cb7d-4eaa-8cf7-4e8254c243f0
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,621
supabase-export-v2
2258278864e3af65
be parsed as multiple headers or joined with adjacent data. Such headers can be generated by custom header classes or bugs in the ``email`` module. As it's a security feature, this defaults to ``True`` even in the :class:`~email.policy.Compat32` policy. For backwards compatible, but unsafe, behavior, it must be set to...
trusted_official_docs
CPython Docs
be parsed as multiple headers or joined with adjacent data. Such headers can be generated by custom header classes or bugs in the ``email`` module. As it's a security feature, this defaults to ``True`` even in the :class:`~email.policy.Compat32` policy. For backwards compatible, but unsafe, behavior, it must be set to...
be parsed as multiple headers or joined with adjacent data. Such headers can be generated by custom header classes or bugs in the ``email`` module. As it's a security feature, this defaults to ``True`` even in the :class:`~email.policy.Compat32` policy. For backwards compatible, but unsafe, behavior, it must be set to...
python, official-docs, cpython, P0
Local_Trusted_Corpus
42dd9400-a566-4224-aed6-295d64f28fad
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,574
supabase-export-v2
6f4eaf7da7976fa5
-------------- The :mod:`email` package's prime focus is the handling of email messages as described by the various email and MIME RFCs. However, the general format of email messages (a block of header fields each consisting of a name followed by a colon followed by a value, the whole block followed by a blank line and...
trusted_official_docs
CPython Docs
-------------- The :mod:`email` package's prime focus is the handling of email messages as described by the various email and MIME RFCs. However, the general format of email messages (a block of header fields each consisting of a name followed by a colon followed by a value, the whole block followed by a blank line and...
-------------- The :mod:`email` package's prime focus is the handling of email messages as described by the various email and MIME RFCs. However, the general format of email messages (a block of header fields each consisting of a name followed by a colon followed by a value, the whole block followed by a blank line and...
python, official-docs, cpython, P0
Local_Trusted_Corpus
446b99e1-75ec-43da-87f2-b6fa9e62a865
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,707
supabase-export-v2
653c30a6ffc3bf46
* Fetching a header value from a :class:`~email.message.Message` results in that header being parsed and a header object created and returned. * Any header object, or any header that is refolded due to the policy settings, is folded using an algorithm that fully implements the RFC folding algorithms, including knowin...
trusted_official_docs
CPython Docs
* Fetching a header value from a :class:`~email.message.Message` results in that header being parsed and a header object created and returned. * Any header object, or any header that is refolded due to the policy settings, is folded using an algorithm that fully implements the RFC folding algorithms, including knowin...
* Fetching a header value from a :class:`~email.message.Message` results in that header being parsed and a header object created and returned. * Any header object, or any header that is refolded due to the policy settings, is folded using an algorithm that fully implements the RFC folding algorithms, including knowin...
python, official-docs, cpython, P0
Local_Trusted_Corpus
4604459a-c71b-4066-ad89-69b965e3db3c
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,656
supabase-export-v2
050de15b3c22c34a
The same as :meth:`fold`, except that the returned value should be a bytes object rather than a string. *value* may contain surrogateescaped binary data. These could be converted back into binary data in the returned bytes object.
trusted_official_docs
CPython Docs
The same as :meth:`fold`, except that the returned value should be a bytes object rather than a string. *value* may contain surrogateescaped binary data. These could be converted back into binary data in the returned bytes object.
The same as :meth:`fold`, except that the returned value should be a bytes object rather than a string. *value* may contain surrogateescaped binary data. These could be converted back into binary data in the returned bytes object.
python, official-docs, cpython, P0
Local_Trusted_Corpus
497262aa-bf45-446b-92c5-52f990b20b18
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,712
supabase-export-v2
6d8e002b3a4edebf
this class, :const:`compat32`, that is used as the default policy. Thus the default behavior of the email package is to maintain compatibility with Python 3.2. The following attributes have values that are different from the :class:`Policy` default:
trusted_official_docs
CPython Docs
this class, :const:`compat32`, that is used as the default policy. Thus the default behavior of the email package is to maintain compatibility with Python 3.2. The following attributes have values that are different from the :class:`Policy` default:
this class, :const:`compat32`, that is used as the default policy. Thus the default behavior of the email package is to maintain compatibility with Python 3.2. The following attributes have values that are different from the :class:`Policy` default:
python, official-docs, cpython, P0
Local_Trusted_Corpus
4b0860fb-d30c-4d3a-8bfa-6d99023ca073
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,668
supabase-export-v2
4459bde7212027ef
program), this attribute indicates whether or not a generator should refold that value when transforming the message back into serialized form. The possible values are: ======== =============================================================== ``none`` all source values use original folding
trusted_official_docs
CPython Docs
program), this attribute indicates whether or not a generator should refold that value when transforming the message back into serialized form. The possible values are: ======== =============================================================== ``none`` all source values use original folding
program), this attribute indicates whether or not a generator should refold that value when transforming the message back into serialized form. The possible values are: ======== =============================================================== ``none`` all source values use original folding
python, official-docs, cpython, P0
Local_Trusted_Corpus
4f753d7b-af9c-4bdd-b704-6b4284cf9dc0
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,645
supabase-export-v2
c1658a89d5060f4c
``Message`` created by a parser). The method should return the ``(name, value)`` tuple that is to be stored in the ``Message`` to represent the header. If an implementation wishes to retain compatibility with the existing email package policies, the *name* and *value* should be strings or string subclasses that do no...
trusted_official_docs
CPython Docs
``Message`` created by a parser). The method should return the ``(name, value)`` tuple that is to be stored in the ``Message`` to represent the header. If an implementation wishes to retain compatibility with the existing email package policies, the *name* and *value* should be strings or string subclasses that do no...
``Message`` created by a parser). The method should return the ``(name, value)`` tuple that is to be stored in the ``Message`` to represent the header. If an implementation wishes to retain compatibility with the existing email package policies, the *name* and *value* should be strings or string subclasses that do no...
python, official-docs, cpython, P0
Local_Trusted_Corpus
52b65657-0d0c-45c1-8767-751eabe1cde1
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,579
supabase-export-v2
a3439deb3a724f80
This default value for the *policy* keyword to :class:`~email.message.EmailMessage` is the :class:`EmailPolicy` policy, via its pre-defined instance :data:`~default`. When a :class:`~email.message.Message` or :class:`~email.message.EmailMessage` object is created, it acquires a policy. If the message is created by a :m...
trusted_official_docs
CPython Docs
This default value for the *policy* keyword to :class:`~email.message.EmailMessage` is the :class:`EmailPolicy` policy, via its pre-defined instance :data:`~default`. When a :class:`~email.message.Message` or :class:`~email.message.EmailMessage` object is created, it acquires a policy. If the message is created by a :m...
This default value for the *policy* keyword to :class:`~email.message.EmailMessage` is the :class:`EmailPolicy` policy, via its pre-defined instance :data:`~default`. When a :class:`~email.message.Message` or :class:`~email.message.EmailMessage` object is created, it acquires a policy. If the message is created by a :m...
python, official-docs, cpython, P0
Local_Trusted_Corpus
5a7f19d8-beeb-462a-a911-e50bc7ee58c2
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,706
supabase-export-v2
20633fd739488e02
* Setting a header on a :class:`~email.message.Message` results in that header being parsed and a header object created. * Fetching a header value from a :class:`~email.message.Message` results in that header being parsed and a header object created and returned.
trusted_official_docs
CPython Docs
* Setting a header on a :class:`~email.message.Message` results in that header being parsed and a header object created. * Fetching a header value from a :class:`~email.message.Message` results in that header being parsed and a header object created and returned.
* Setting a header on a :class:`~email.message.Message` results in that header being parsed and a header object created. * Fetching a header value from a :class:`~email.message.Message` results in that header being parsed and a header object created and returned.
python, official-docs, cpython, P0
Local_Trusted_Corpus
6491ae09-cde6-491a-aa8d-26c3609eaf72
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,673
supabase-export-v2
ddb5b45b7c91e2b9
.. attribute:: header_factory A callable that takes two arguments, ``name`` and ``value``, where ``name`` is a header field name and ``value`` is an unfolded header field value, and returns a string subclass that represents that header. A default ``header_factory`` (see :mod:`~email.headerregistry`) is provided tha...
trusted_official_docs
CPython Docs
.. attribute:: header_factory A callable that takes two arguments, ``name`` and ``value``, where ``name`` is a header field name and ``value`` is an unfolded header field value, and returns a string subclass that represents that header. A default ``header_factory`` (see :mod:`~email.headerregistry`) is provided tha...
.. attribute:: header_factory A callable that takes two arguments, ``name`` and ``value``, where ``name`` is a header field name and ``value`` is an unfolded header field value, and returns a string subclass that represents that header. A default ``header_factory`` (see :mod:`~email.headerregistry`) is provided tha...
python, official-docs, cpython, P0
Local_Trusted_Corpus
64fabd5d-b1b1-4e7f-ade3-5132eef0bf81
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,599
supabase-export-v2
ebd2f71251787089
provides default implementations for a couple of trivial methods, as well as the implementation of the immutability property, the :meth:`clone` method, and the constructor semantics. The constructor of a policy class can be passed various keyword arguments. The arguments that may be specified are any non-method propert...
trusted_official_docs
CPython Docs
provides default implementations for a couple of trivial methods, as well as the implementation of the immutability property, the :meth:`clone` method, and the constructor semantics. The constructor of a policy class can be passed various keyword arguments. The arguments that may be specified are any non-method propert...
provides default implementations for a couple of trivial methods, as well as the implementation of the immutability property, the :meth:`clone` method, and the constructor semantics. The constructor of a policy class can be passed various keyword arguments. The arguments that may be specified are any non-method propert...
python, official-docs, cpython, P0
Local_Trusted_Corpus
65b529ce-9621-4882-9b5f-7be19e799339
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,592
supabase-export-v2
8329a7173a53064e
object from the previous example and writes the message to a file using the native line separators for the platform on which it is running:: >>> import os >>> with open('converted.txt', 'wb') as f: ... f.write(msg.as_bytes(policy=msg.policy.clone(linesep=os.linesep))) 17
trusted_official_docs
CPython Docs
object from the previous example and writes the message to a file using the native line separators for the platform on which it is running:: >>> import os >>> with open('converted.txt', 'wb') as f: ... f.write(msg.as_bytes(policy=msg.policy.clone(linesep=os.linesep))) 17
object from the previous example and writes the message to a file using the native line separators for the platform on which it is running:: >>> import os >>> with open('converted.txt', 'wb') as f: ... f.write(msg.as_bytes(policy=msg.policy.clone(linesep=os.linesep))) 17
python, official-docs, cpython, P0
Local_Trusted_Corpus
66ae5931-2779-422f-af76-d5b278a96f62
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,708
supabase-export-v2
7b2c97e921b8ae23
to the policy settings, is folded using an algorithm that fully implements the RFC folding algorithms, including knowing where encoded words are required and allowed. From the application view, this means that any header obtained through the :class:`~email.message.EmailMessage` is a header object with extra attributes,...
trusted_official_docs
CPython Docs
to the policy settings, is folded using an algorithm that fully implements the RFC folding algorithms, including knowing where encoded words are required and allowed. From the application view, this means that any header obtained through the :class:`~email.message.EmailMessage` is a header object with extra attributes,...
to the policy settings, is folded using an algorithm that fully implements the RFC folding algorithms, including knowing where encoded words are required and allowed. From the application view, this means that any header obtained through the :class:`~email.message.EmailMessage` is a header object with extra attributes,...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6abec20c-4d63-46d4-9095-472d65335dc4
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,660
supabase-export-v2
501781323e8081ab
strings, headers are ``str`` subclasses with attributes that depend on the type of the field. The parsing and folding algorithm fully implement :rfc:`2047` and :rfc:`5322`. The default value for the :attr:`~email.policy.Policy.message_factory` attribute is :class:`~email.message.EmailMessage`.
trusted_official_docs
CPython Docs
strings, headers are ``str`` subclasses with attributes that depend on the type of the field. The parsing and folding algorithm fully implement :rfc:`2047` and :rfc:`5322`. The default value for the :attr:`~email.policy.Policy.message_factory` attribute is :class:`~email.message.EmailMessage`.
strings, headers are ``str`` subclasses with attributes that depend on the type of the field. The parsing and folding algorithm fully implement :rfc:`2047` and :rfc:`5322`. The default value for the :attr:`~email.policy.Policy.message_factory` attribute is :class:`~email.message.EmailMessage`.
python, official-docs, cpython, P0
Local_Trusted_Corpus
6ba3cfa8-146c-4854-920e-a1d99a93b7d5
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,629
supabase-export-v2
dbd26fe62d5d2fb5
Handle a *defect* found on *obj*. When the email package calls this method, *defect* will always be a subclass of :class:`~email.errors.MessageDefect`. The default implementation checks the :attr:`raise_on_defect` flag. If it is ``True``, *defect* is raised as an exception. If it is ``False`` (the default), *obj* and...
trusted_official_docs
CPython Docs
Handle a *defect* found on *obj*. When the email package calls this method, *defect* will always be a subclass of :class:`~email.errors.MessageDefect`. The default implementation checks the :attr:`raise_on_defect` flag. If it is ``True``, *defect* is raised as an exception. If it is ``False`` (the default), *obj* and...
Handle a *defect* found on *obj*. When the email package calls this method, *defect* will always be a subclass of :class:`~email.errors.MessageDefect`. The default implementation checks the :attr:`raise_on_defect` flag. If it is ``True``, *defect* is raised as an exception. If it is ``False`` (the default), *obj* and...
python, official-docs, cpython, P0
Local_Trusted_Corpus
6fe82ca0-b71e-4166-b6b4-6195024743fc
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,591
supabase-export-v2
6ad7e05ef7ec9ed7
the RFC correct line separator characters when creating the binary string to feed into ``sendmail's`` ``stdin``, where the default policy would use ``\n`` line separators. Some email package methods accept a *policy* keyword argument, allowing the policy to be overridden for that method. For example, the following code...
trusted_official_docs
CPython Docs
the RFC correct line separator characters when creating the binary string to feed into ``sendmail's`` ``stdin``, where the default policy would use ``\n`` line separators. Some email package methods accept a *policy* keyword argument, allowing the policy to be overridden for that method. For example, the following code...
the RFC correct line separator characters when creating the binary string to feed into ``sendmail's`` ``stdin``, where the default policy would use ``\n`` line separators. Some email package methods accept a *policy* keyword argument, allowing the policy to be overridden for that method. For example, the following code...
python, official-docs, cpython, P0
Local_Trusted_Corpus
716bba3e-ea71-4f49-aaa7-f2af04ce4978
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,582
supabase-export-v2
bad1c73758ecf57c
part describes the concrete classes :class:`EmailPolicy` and :class:`Compat32`, which implement the hooks that provide the standard behavior and the backward compatible behavior and features, respectively. :class:`Policy` instances are immutable, but they can be cloned, accepting the same keyword arguments as the class...
trusted_official_docs
CPython Docs
part describes the concrete classes :class:`EmailPolicy` and :class:`Compat32`, which implement the hooks that provide the standard behavior and the backward compatible behavior and features, respectively. :class:`Policy` instances are immutable, but they can be cloned, accepting the same keyword arguments as the class...
part describes the concrete classes :class:`EmailPolicy` and :class:`Compat32`, which implement the hooks that provide the standard behavior and the backward compatible behavior and features, respectively. :class:`Policy` instances are immutable, but they can be cloned, accepting the same keyword arguments as the class...
python, official-docs, cpython, P0
Local_Trusted_Corpus
7851f0d4-61df-4fb4-b90e-06be87b6d314
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,659
supabase-export-v2
bdac431703bf359e
is intended to be fully compliant with the current email RFCs. These include (but are not limited to) :rfc:`5322`, :rfc:`2047`, and the current MIME RFCs. This policy adds new header parsing and folding algorithms. Instead of simple strings, headers are ``str`` subclasses with attributes that depend on the type of th...
trusted_official_docs
CPython Docs
is intended to be fully compliant with the current email RFCs. These include (but are not limited to) :rfc:`5322`, :rfc:`2047`, and the current MIME RFCs. This policy adds new header parsing and folding algorithms. Instead of simple strings, headers are ``str`` subclasses with attributes that depend on the type of th...
is intended to be fully compliant with the current email RFCs. These include (but are not limited to) :rfc:`5322`, :rfc:`2047`, and the current MIME RFCs. This policy adds new header parsing and folding algorithms. Instead of simple strings, headers are ``str`` subclasses with attributes that depend on the type of th...
python, official-docs, cpython, P0
Local_Trusted_Corpus
79539628-2d42-46b8-b0a7-b489a5e331e3
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,626
supabase-export-v2
519c29871e02a63f
new :class:`Policy` instance whose attributes have the same values as the current instance, except where those attributes are given new values by the keyword arguments. The remaining :class:`Policy` methods are called by the email package code, and are not intended to be called by an application using the email packag...
trusted_official_docs
CPython Docs
new :class:`Policy` instance whose attributes have the same values as the current instance, except where those attributes are given new values by the keyword arguments. The remaining :class:`Policy` methods are called by the email package code, and are not intended to be called by an application using the email packag...
new :class:`Policy` instance whose attributes have the same values as the current instance, except where those attributes are given new values by the keyword arguments. The remaining :class:`Policy` methods are called by the email package code, and are not intended to be called by an application using the email packag...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8028e97f-9e2a-441c-8713-fb97d55c506a
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,610
supabase-export-v2
7e0ffeef65bfcdcd
to be ASCII-only and so will be encoded (see :meth:`fold_binary` and :attr:`~EmailPolicy.utf8` below for exceptions), but body parts may use the ``8bit`` CTE. ======== =============================================================== A ``cte_type`` value of ``8bit`` only works with ``BytesGenerator``, not ``Generator``,...
trusted_official_docs
CPython Docs
to be ASCII-only and so will be encoded (see :meth:`fold_binary` and :attr:`~EmailPolicy.utf8` below for exceptions), but body parts may use the ``8bit`` CTE. ======== =============================================================== A ``cte_type`` value of ``8bit`` only works with ``BytesGenerator``, not ``Generator``,...
to be ASCII-only and so will be encoded (see :meth:`fold_binary` and :attr:`~EmailPolicy.utf8` below for exceptions), but body parts may use the ``8bit`` CTE. ======== =============================================================== A ``cte_type`` value of ``8bit`` only works with ``BytesGenerator``, not ``Generator``,...
python, official-docs, cpython, P0
Local_Trusted_Corpus
829e1fde-a777-413e-9a3c-c47b4f667861
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,685
supabase-export-v2
765b7b99ef38f0cb
.. method:: header_fetch_parse(name, value) If the value has a ``name`` attribute, it is returned to unmodified. Otherwise the *name*, and the *value* with any CR or LF characters removed, are passed to the ``header_factory``, and the resulting header object is returned. Any surrogateescaped bytes get turned into th...
trusted_official_docs
CPython Docs
.. method:: header_fetch_parse(name, value) If the value has a ``name`` attribute, it is returned to unmodified. Otherwise the *name*, and the *value* with any CR or LF characters removed, are passed to the ``header_factory``, and the resulting header object is returned. Any surrogateescaped bytes get turned into th...
.. method:: header_fetch_parse(name, value) If the value has a ``name`` attribute, it is returned to unmodified. Otherwise the *name*, and the *value* with any CR or LF characters removed, are passed to the ``header_factory``, and the resulting header object is returned. Any surrogateescaped bytes get turned into th...
python, official-docs, cpython, P0
Local_Trusted_Corpus
8708daf2-da3f-4067-84a1-33e9ce5ed439
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,705
supabase-export-v2
b692ad00c3f4fc28
With all of these :class:`EmailPolicies <.EmailPolicy>`, the effective API of the email package is changed from the Python 3.2 API in the following ways: * Setting a header on a :class:`~email.message.Message` results in that header being parsed and a header object created.
trusted_official_docs
CPython Docs
With all of these :class:`EmailPolicies <.EmailPolicy>`, the effective API of the email package is changed from the Python 3.2 API in the following ways: * Setting a header on a :class:`~email.message.Message` results in that header being parsed and a header object created.
With all of these :class:`EmailPolicies <.EmailPolicy>`, the effective API of the email package is changed from the Python 3.2 API in the following ways: * Setting a header on a :class:`~email.message.Message` results in that header being parsed and a header object created.
python, official-docs, cpython, P0
Local_Trusted_Corpus
8c48e9ce-3a6a-46ad-a711-848be5e436f3
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,658
supabase-export-v2
cceb5d319c130a4f
.. class:: EmailPolicy(**kw) This concrete :class:`Policy` provides behavior that is intended to be fully compliant with the current email RFCs. These include (but are not limited to) :rfc:`5322`, :rfc:`2047`, and the current MIME RFCs.
trusted_official_docs
CPython Docs
.. class:: EmailPolicy(**kw) This concrete :class:`Policy` provides behavior that is intended to be fully compliant with the current email RFCs. These include (but are not limited to) :rfc:`5322`, :rfc:`2047`, and the current MIME RFCs.
.. class:: EmailPolicy(**kw) This concrete :class:`Policy` provides behavior that is intended to be fully compliant with the current email RFCs. These include (but are not limited to) :rfc:`5322`, :rfc:`2047`, and the current MIME RFCs.
python, official-docs, cpython, P0
Local_Trusted_Corpus
98a82d7e-9166-4827-9ef8-74f9d98a057a
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,576
supabase-export-v2
ebd458cd779d0b33
Policy objects give the email package the flexibility to handle all these disparate use cases. A :class:`Policy` object encapsulates a set of attributes and methods that control the behavior of various components of the email package during use. :class:`Policy` instances can be passed to various classes and methods in ...
trusted_official_docs
CPython Docs
Policy objects give the email package the flexibility to handle all these disparate use cases. A :class:`Policy` object encapsulates a set of attributes and methods that control the behavior of various components of the email package during use. :class:`Policy` instances can be passed to various classes and methods in ...
Policy objects give the email package the flexibility to handle all these disparate use cases. A :class:`Policy` object encapsulates a set of attributes and methods that control the behavior of various components of the email package during use. :class:`Policy` instances can be passed to various classes and methods in ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9ae04915-ce87-4465-8fb9-2975da5442fe
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,581
supabase-export-v2
7074eaa70c787458
Therefore you should **always specify explicitly which policy you want to use** when calling any of the classes and functions described in the :mod:`~email.parser` module. The first part of this documentation covers the features of :class:`Policy`, an :term:`abstract base class` that defines the features that are commo...
trusted_official_docs
CPython Docs
Therefore you should **always specify explicitly which policy you want to use** when calling any of the classes and functions described in the :mod:`~email.parser` module. The first part of this documentation covers the features of :class:`Policy`, an :term:`abstract base class` that defines the features that are commo...
Therefore you should **always specify explicitly which policy you want to use** when calling any of the classes and functions described in the :mod:`~email.parser` module. The first part of this documentation covers the features of :class:`Policy`, an :term:`abstract base class` that defines the features that are commo...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9b823faa-9cbe-4c40-997c-c9a6a13db302
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,578
supabase-export-v2
e835ca21e3f2c53e
corresponding pre-defined instance :const:`compat32`. This policy provides for complete backward compatibility (in some cases, including bug compatibility) with the pre-Python3.3 version of the email package. This default value for the *policy* keyword to :class:`~email.message.EmailMessage` is the :class:`EmailPolicy`...
trusted_official_docs
CPython Docs
corresponding pre-defined instance :const:`compat32`. This policy provides for complete backward compatibility (in some cases, including bug compatibility) with the pre-Python3.3 version of the email package. This default value for the *policy* keyword to :class:`~email.message.EmailMessage` is the :class:`EmailPolicy`...
corresponding pre-defined instance :const:`compat32`. This policy provides for complete backward compatibility (in some cases, including bug compatibility) with the pre-Python3.3 version of the email package. This default value for the *policy* keyword to :class:`~email.message.EmailMessage` is the :class:`EmailPolicy`...
python, official-docs, cpython, P0
Local_Trusted_Corpus
9c0c1088-4ef0-4f44-82a1-d8a2b5cbaa53
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,594
supabase-export-v2
d89f1a575b9d2091
can also be combined using the addition operator, producing a policy object whose settings are a combination of the non-default values of the summed objects:: >>> compat_SMTP = policy.compat32.clone(linesep='\r\n') >>> compat_strict = policy.compat32.clone(raise_on_defect=True) >>> compat_strict_SMTP = compat_SMTP + ...
trusted_official_docs
CPython Docs
can also be combined using the addition operator, producing a policy object whose settings are a combination of the non-default values of the summed objects:: >>> compat_SMTP = policy.compat32.clone(linesep='\r\n') >>> compat_strict = policy.compat32.clone(raise_on_defect=True) >>> compat_strict_SMTP = compat_SMTP + ...
can also be combined using the addition operator, producing a policy object whose settings are a combination of the non-default values of the summed objects:: >>> compat_SMTP = policy.compat32.clone(linesep='\r\n') >>> compat_strict = policy.compat32.clone(raise_on_defect=True) >>> compat_strict_SMTP = compat_SMTP + ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
a62fd505-be97-4334-b03c-f9bde3f4437e
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,590
supabase-export-v2
114773682c5bbc77
mymsg.close() mocker.stop() import os os.remove('mymsg.txt') Here we are telling :class:`~email.generator.BytesGenerator` to use the RFC correct line separator characters when creating the binary string to feed into ``sendmail's`` ``stdin``, where the default policy would use ``\n`` line separators.
trusted_official_docs
CPython Docs
mymsg.close() mocker.stop() import os os.remove('mymsg.txt') Here we are telling :class:`~email.generator.BytesGenerator` to use the RFC correct line separator characters when creating the binary string to feed into ``sendmail's`` ``stdin``, where the default policy would use ``\n`` line separators.
mymsg.close() mocker.stop() import os os.remove('mymsg.txt') Here we are telling :class:`~email.generator.BytesGenerator` to use the RFC correct line separator characters when creating the binary string to feed into ``sendmail's`` ``stdin``, where the default policy would use ``\n`` line separators.
python, official-docs, cpython, P0
Local_Trusted_Corpus
a83909b6-849d-4fae-90cc-7bfff61abbfe
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,652
supabase-export-v2
8d2e7cd52f4f1db2
.. method:: fold(name, value) The email package calls this method with the *name* and *value* currently stored in the ``Message`` for a given header. The method should return a string that represents that header "folded" correctly (according to the policy settings) by composing the *name* with the *value* and insert...
trusted_official_docs
CPython Docs
.. method:: fold(name, value) The email package calls this method with the *name* and *value* currently stored in the ``Message`` for a given header. The method should return a string that represents that header "folded" correctly (according to the policy settings) by composing the *name* with the *value* and insert...
.. method:: fold(name, value) The email package calls this method with the *name* and *value* currently stored in the ``Message`` for a given header. The method should return a string that represents that header "folded" correctly (according to the policy settings) by composing the *name* with the *value* and insert...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ad4a452e-025f-429f-84fb-425f5b732811
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,683
supabase-export-v2
64630af1611da03d
.. method:: header_store_parse(name, value) The name is returned unchanged. If the input value has a ``name`` attribute and it matches *name* ignoring case, the value is returned unchanged. Otherwise the *name* and *value* are passed to ``header_factory``, and the resulting header object is returned as the value. I...
trusted_official_docs
CPython Docs
.. method:: header_store_parse(name, value) The name is returned unchanged. If the input value has a ``name`` attribute and it matches *name* ignoring case, the value is returned unchanged. Otherwise the *name* and *value* are passed to ``header_factory``, and the resulting header object is returned as the value. I...
.. method:: header_store_parse(name, value) The name is returned unchanged. If the input value has a ``name`` attribute and it matches *name* ignoring case, the value is returned unchanged. Otherwise the *name* and *value* are passed to ``header_factory``, and the resulting header object is returned as the value. I...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b094ec25-ccdd-40ff-bc24-f6dcbb9b752d
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,648
supabase-export-v2
b26b8d14e2ec781c
.. method:: header_fetch_parse(name, value) The email package calls this method with the *name* and *value* currently stored in the ``Message`` when that header is requested by the application program, and whatever the method returns is what is passed back to the application as the value of the header being retrieve...
trusted_official_docs
CPython Docs
.. method:: header_fetch_parse(name, value) The email package calls this method with the *name* and *value* currently stored in the ``Message`` when that header is requested by the application program, and whatever the method returns is what is passed back to the application as the value of the header being retrieve...
.. method:: header_fetch_parse(name, value) The email package calls this method with the *name* and *value* currently stored in the ``Message`` when that header is requested by the application program, and whatever the method returns is what is passed back to the application as the value of the header being retrieve...
python, official-docs, cpython, P0
Local_Trusted_Corpus
b311e172-2f59-434b-855e-bf21828f4c9a
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,641
supabase-export-v2
b2b805cf5f85f2ae
up to the '``:``' separator), while *value* should be the unfolded value (all line separator characters removed, but whitespace kept intact), stripped of leading whitespace. *sourcelines* may contain surrogateescaped binary data.
trusted_official_docs
CPython Docs
up to the '``:``' separator), while *value* should be the unfolded value (all line separator characters removed, but whitespace kept intact), stripped of leading whitespace. *sourcelines* may contain surrogateescaped binary data.
up to the '``:``' separator), while *value* should be the unfolded value (all line separator characters removed, but whitespace kept intact), stripped of leading whitespace. *sourcelines* may contain surrogateescaped binary data.
python, official-docs, cpython, P0
Local_Trusted_Corpus
b900772a-b394-4d87-b651-a8896b33b7fa
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,675
supabase-export-v2
b7708f6d568f1350
.. attribute:: content_manager An object with at least two methods: get_content and set_content. When the :meth:`~email.message.EmailMessage.get_content` or :meth:`~email.message.EmailMessage.set_content` method of an :class:`~email.message.EmailMessage` object is called, it calls the corresponding method of this o...
trusted_official_docs
CPython Docs
.. attribute:: content_manager An object with at least two methods: get_content and set_content. When the :meth:`~email.message.EmailMessage.get_content` or :meth:`~email.message.EmailMessage.set_content` method of an :class:`~email.message.EmailMessage` object is called, it calls the corresponding method of this o...
.. attribute:: content_manager An object with at least two methods: get_content and set_content. When the :meth:`~email.message.EmailMessage.get_content` or :meth:`~email.message.EmailMessage.set_content` method of an :class:`~email.message.EmailMessage` object is called, it calls the corresponding method of this o...
python, official-docs, cpython, P0
Local_Trusted_Corpus
bb1ae10d-b8cb-4bf2-82fb-a1e9ef1d2aaf
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,698
supabase-export-v2
5717e4bfb93c8867
.. data:: SMTPUTF8 The same as ``SMTP`` except that :attr:`~EmailPolicy.utf8` is ``True``. Useful for serializing messages to a message store without using encoded words in the headers. Should only be used for SMTP transmission if the sender or recipient addresses have non-ASCII characters (the :meth:`smtplib.SMTP.s...
trusted_official_docs
CPython Docs
.. data:: SMTPUTF8 The same as ``SMTP`` except that :attr:`~EmailPolicy.utf8` is ``True``. Useful for serializing messages to a message store without using encoded words in the headers. Should only be used for SMTP transmission if the sender or recipient addresses have non-ASCII characters (the :meth:`smtplib.SMTP.s...
.. data:: SMTPUTF8 The same as ``SMTP`` except that :attr:`~EmailPolicy.utf8` is ``True``. Useful for serializing messages to a message store without using encoded words in the headers. Should only be used for SMTP transmission if the sender or recipient addresses have non-ASCII characters (the :meth:`smtplib.SMTP.s...
python, official-docs, cpython, P0
Local_Trusted_Corpus
bd9a161c-33aa-4738-9e7f-458d618a8ea3
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,632
supabase-export-v2
630e337ea92b87d7
Register a *defect* on *obj*. In the email package, *defect* will always be a subclass of :class:`~email.errors.MessageDefect`. The default implementation calls the ``append`` method of the ``defects`` attribute of *obj*. When the email package calls :attr:`handle_defect`, *obj* will normally have a ``defects`` attri...
trusted_official_docs
CPython Docs
Register a *defect* on *obj*. In the email package, *defect* will always be a subclass of :class:`~email.errors.MessageDefect`. The default implementation calls the ``append`` method of the ``defects`` attribute of *obj*. When the email package calls :attr:`handle_defect`, *obj* will normally have a ``defects`` attri...
Register a *defect* on *obj*. In the email package, *defect* will always be a subclass of :class:`~email.errors.MessageDefect`. The default implementation calls the ``append`` method of the ``defects`` attribute of *obj*. When the email package calls :attr:`handle_defect`, *obj* will normally have a ``defects`` attri...
python, official-docs, cpython, P0
Local_Trusted_Corpus
c0de8c23-498a-4e98-a7ca-256727d2d9a0
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,637
supabase-export-v2
612b7027a9d96276
a ``Message`` programmatically. (The limit is not observed by the parser, which will faithfully produce as many headers as exist in the message being parsed.) The default implementation returns ``None`` for all header names.
trusted_official_docs
CPython Docs
a ``Message`` programmatically. (The limit is not observed by the parser, which will faithfully produce as many headers as exist in the message being parsed.) The default implementation returns ``None`` for all header names.
a ``Message`` programmatically. (The limit is not observed by the parser, which will faithfully produce as many headers as exist in the message being parsed.) The default implementation returns ``None`` for all header names.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ccb49405-a706-423f-b4f6-0cc1e099cf74
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,664
supabase-export-v2
03178e8f572bb5c5
follow :rfc:`6532` and use ``utf-8`` encoding for headers. Messages formatted in this way may be passed to SMTP servers that support the ``SMTPUTF8`` extension (:rfc:`6531`). When ``False``, the generator will raise :exc:`~email.errors.HeaderWriteError` if any header includes non-ASCII characters in a context where :...
trusted_official_docs
CPython Docs
follow :rfc:`6532` and use ``utf-8`` encoding for headers. Messages formatted in this way may be passed to SMTP servers that support the ``SMTPUTF8`` extension (:rfc:`6531`). When ``False``, the generator will raise :exc:`~email.errors.HeaderWriteError` if any header includes non-ASCII characters in a context where :...
follow :rfc:`6532` and use ``utf-8`` encoding for headers. Messages formatted in this way may be passed to SMTP servers that support the ``SMTPUTF8`` extension (:rfc:`6531`). When ``False``, the generator will raise :exc:`~email.errors.HeaderWriteError` if any header includes non-ASCII characters in a context where :...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d0847b43-6b98-49a8-82d1-1da1b2855f27
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,580
supabase-export-v2
486fc01fc73b29e1
the message by default, but you can also pass a specific policy to the generator that will override the one stored on the message object. The default value for the *policy* keyword for the :mod:`email.parser` classes and the parser convenience functions **will be changing** in a future version of Python. Therefore you ...
trusted_official_docs
CPython Docs
the message by default, but you can also pass a specific policy to the generator that will override the one stored on the message object. The default value for the *policy* keyword for the :mod:`email.parser` classes and the parser convenience functions **will be changing** in a future version of Python. Therefore you ...
the message by default, but you can also pass a specific policy to the generator that will override the one stored on the message object. The default value for the *policy* keyword for the :mod:`email.parser` classes and the parser convenience functions **will be changing** in a future version of Python. Therefore you ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d2be11ba-44da-49db-8499-64f7eb147455
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,725
supabase-export-v2
37fd55b1fa3dfe48
.. method:: fold_binary(name, value) Headers are folded using the :class:`~email.header.Header` folding algorithm, which preserves existing line breaks in the value, and wraps each resulting line to the ``max_line_length``. If ``cte_type`` is ``7bit``, non-ascii binary data is CTE encoded using the ``unknown-8bit`` ...
trusted_official_docs
CPython Docs
.. method:: fold_binary(name, value) Headers are folded using the :class:`~email.header.Header` folding algorithm, which preserves existing line breaks in the value, and wraps each resulting line to the ``max_line_length``. If ``cte_type`` is ``7bit``, non-ascii binary data is CTE encoded using the ``unknown-8bit`` ...
.. method:: fold_binary(name, value) Headers are folded using the :class:`~email.header.Header` folding algorithm, which preserves existing line breaks in the value, and wraps each resulting line to the ``max_line_length``. If ``cte_type`` is ``7bit``, non-ascii binary data is CTE encoded using the ``unknown-8bit`` ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d2f68f2a-9fd8-4afe-8b3f-c5c46ae82e10
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,644
supabase-export-v2
01bdcbea3db735bc
.. method:: header_store_parse(name, value) The email package calls this method with the name and value provided by the application program when the application program is modifying a ``Message`` programmatically (as opposed to a ``Message`` created by a parser). The method should return the ``(name, value)`` tuple ...
trusted_official_docs
CPython Docs
.. method:: header_store_parse(name, value) The email package calls this method with the name and value provided by the application program when the application program is modifying a ``Message`` programmatically (as opposed to a ``Message`` created by a parser). The method should return the ``(name, value)`` tuple ...
.. method:: header_store_parse(name, value) The email package calls this method with the name and value provided by the application program when the application program is modifying a ``Message`` programmatically (as opposed to a ``Message`` created by a parser). The method should return the ``(name, value)`` tuple ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d2f80921-a1f9-46ce-89e7-f829c77eced7
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,688
supabase-export-v2
46c2eb570029e5a0
any CR and LF characters removed to the ``header_factory``. Folding of a header object is done by calling its ``fold`` method with the current policy. Source values are split into lines using :meth:`~str.splitlines`. If the value is not to be refolded, the lines are rejoined using the ``linesep`` from the policy and ...
trusted_official_docs
CPython Docs
any CR and LF characters removed to the ``header_factory``. Folding of a header object is done by calling its ``fold`` method with the current policy. Source values are split into lines using :meth:`~str.splitlines`. If the value is not to be refolded, the lines are rejoined using the ``linesep`` from the policy and ...
any CR and LF characters removed to the ``header_factory``. Folding of a header object is done by calling its ``fold`` method with the current policy. Source values are split into lines using :meth:`~str.splitlines`. If the value is not to be refolded, the lines are rejoined using the ``linesep`` from the policy and ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
d57e1b10-0c5e-40f9-95f1-08d1e6bd185a
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,639
supabase-export-v2
87e746e772213f6b
.. method:: header_source_parse(sourcelines) The email package calls this method with a list of strings, each string ending with the line separation characters found in the source being parsed. The first line includes the field header name and separator. All whitespace in the source is preserved. The method should re...
trusted_official_docs
CPython Docs
.. method:: header_source_parse(sourcelines) The email package calls this method with a list of strings, each string ending with the line separation characters found in the source being parsed. The first line includes the field header name and separator. All whitespace in the source is preserved. The method should re...
.. method:: header_source_parse(sourcelines) The email package calls this method with a list of strings, each string ending with the line separation characters found in the source being parsed. The first line includes the field header name and separator. All whitespace in the source is preserved. The method should re...
python, official-docs, cpython, P0
Local_Trusted_Corpus
da2a655f-d786-4de6-af3a-a9bf6d092fb6
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,640
supabase-export-v2
dd986ed8a9ad9b08
the source is preserved. The method should return the ``(name, value)`` tuple that is to be stored in the ``Message`` to represent the parsed header. If an implementation wishes to retain compatibility with the existing email package policies, *name* should be the case preserved name (all characters up to the '``:``'...
trusted_official_docs
CPython Docs
the source is preserved. The method should return the ``(name, value)`` tuple that is to be stored in the ``Message`` to represent the parsed header. If an implementation wishes to retain compatibility with the existing email package policies, *name* should be the case preserved name (all characters up to the '``:``'...
the source is preserved. The method should return the ``(name, value)`` tuple that is to be stored in the ``Message`` to represent the parsed header. If an implementation wishes to retain compatibility with the existing email package policies, *name* should be the case preserved name (all characters up to the '``:``'...
python, official-docs, cpython, P0
Local_Trusted_Corpus
da44cc1a-b5e2-4127-a947-692d4ea2af79
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,598
supabase-export-v2
1e6495d8fa43c50b
.. class:: Policy(**kw) This is the :term:`abstract base class` for all policy classes. It provides default implementations for a couple of trivial methods, as well as the implementation of the immutability property, the :meth:`clone` method, and the constructor semantics.
trusted_official_docs
CPython Docs
.. class:: Policy(**kw) This is the :term:`abstract base class` for all policy classes. It provides default implementations for a couple of trivial methods, as well as the implementation of the immutability property, the :meth:`clone` method, and the constructor semantics.
.. class:: Policy(**kw) This is the :term:`abstract base class` for all policy classes. It provides default implementations for a couple of trivial methods, as well as the implementation of the immutability property, the :meth:`clone` method, and the constructor semantics.
python, official-docs, cpython, P0
Local_Trusted_Corpus
e6d210c8-2ec5-46ff-9411-904564bd0d28
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,649
supabase-export-v2
5b07b8f0c9842552
same name stored in the ``Message``; the method is passed the specific name and value of the header destined to be returned to the application. *value* may contain surrogateescaped binary data. There should be no surrogateescaped binary data in the value returned by the method.
trusted_official_docs
CPython Docs
same name stored in the ``Message``; the method is passed the specific name and value of the header destined to be returned to the application. *value* may contain surrogateescaped binary data. There should be no surrogateescaped binary data in the value returned by the method.
same name stored in the ``Message``; the method is passed the specific name and value of the header destined to be returned to the application. *value* may contain surrogateescaped binary data. There should be no surrogateescaped binary data in the value returned by the method.
python, official-docs, cpython, P0
Local_Trusted_Corpus
eb5b9a4a-5107-4962-b272-36427a0f075a
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,625
supabase-export-v2
90623fc621112aec
.. method:: clone(**kw) Return a new :class:`Policy` instance whose attributes have the same values as the current instance, except where those attributes are given new values by the keyword arguments.
trusted_official_docs
CPython Docs
.. method:: clone(**kw) Return a new :class:`Policy` instance whose attributes have the same values as the current instance, except where those attributes are given new values by the keyword arguments.
.. method:: clone(**kw) Return a new :class:`Policy` instance whose attributes have the same values as the current instance, except where those attributes are given new values by the keyword arguments.
python, official-docs, cpython, P0
Local_Trusted_Corpus
ec3b16e3-3698-46ab-8bde-01d6ae406a79
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,587
supabase-export-v2
5c4581c5d9d91b4c
.. doctest:: >>> from email import message_from_binary_file >>> from email.generator import BytesGenerator >>> from email import policy >>> from subprocess import Popen, PIPE >>> with open('mymsg.txt', 'rb') as f: ... msg = message_from_binary_file(f, policy=policy.default) ... >>> p = Popen(['sendmail', msg['To'...
trusted_official_docs
CPython Docs
.. doctest:: >>> from email import message_from_binary_file >>> from email.generator import BytesGenerator >>> from email import policy >>> from subprocess import Popen, PIPE >>> with open('mymsg.txt', 'rb') as f: ... msg = message_from_binary_file(f, policy=policy.default) ... >>> p = Popen(['sendmail', msg['To'...
.. doctest:: >>> from email import message_from_binary_file >>> from email.generator import BytesGenerator >>> from email import policy >>> from subprocess import Popen, PIPE >>> with open('mymsg.txt', 'rb') as f: ... msg = message_from_binary_file(f, policy=policy.default) ... >>> p = Popen(['sendmail', msg['To'...
python, official-docs, cpython, P0
Local_Trusted_Corpus
ecf4cb44-3d65-405c-b73f-6bd26a57d2b7
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,596
supabase-export-v2
74cf2fe82e201ad4
This operation is not commutative; that is, the order in which the objects are added matters. To illustrate:: >>> policy100 = policy.compat32.clone(max_line_length=100) >>> policy80 = policy.compat32.clone(max_line_length=80) >>> apolicy = policy100 + policy80 >>> apolicy.max_line_length 80 >>> apolicy = policy80 ...
trusted_official_docs
CPython Docs
This operation is not commutative; that is, the order in which the objects are added matters. To illustrate:: >>> policy100 = policy.compat32.clone(max_line_length=100) >>> policy80 = policy.compat32.clone(max_line_length=80) >>> apolicy = policy100 + policy80 >>> apolicy.max_line_length 80 >>> apolicy = policy80 ...
This operation is not commutative; that is, the order in which the objects are added matters. To illustrate:: >>> policy100 = policy.compat32.clone(max_line_length=100) >>> policy80 = policy.compat32.clone(max_line_length=80) >>> apolicy = policy100 + policy80 >>> apolicy.max_line_length 80 >>> apolicy = policy80 ...
python, official-docs, cpython, P0
Local_Trusted_Corpus
eef0be57-ba83-417a-aedf-4b33478df182
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,609
supabase-export-v2
d0d77c9a29060a85
=============================================================== ``7bit`` all data must be "7 bit clean" (ASCII-only). This means that where necessary data will be encoded using either quoted-printable or base64 encoding. ``8bit`` data is not constrained to be 7 bit clean. Data in headers is still required to be ASCII-...
trusted_official_docs
CPython Docs
=============================================================== ``7bit`` all data must be "7 bit clean" (ASCII-only). This means that where necessary data will be encoded using either quoted-printable or base64 encoding. ``8bit`` data is not constrained to be 7 bit clean. Data in headers is still required to be ASCII-...
=============================================================== ``7bit`` all data must be "7 bit clean" (ASCII-only). This means that where necessary data will be encoded using either quoted-printable or base64 encoding. ``8bit`` data is not constrained to be 7 bit clean. Data in headers is still required to be ASCII-...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f17f64fa-51d3-4f7e-953e-306bdcf1c584
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,577
supabase-export-v2
0d5384d0c3b38da7
be passed to various classes and methods in the email package to alter the default behavior. The settable values and their defaults are described below. There is a default policy used by all classes in the email package. For all of the :mod:`~email.parser` classes and the related convenience functions, and for the :cla...
trusted_official_docs
CPython Docs
be passed to various classes and methods in the email package to alter the default behavior. The settable values and their defaults are described below. There is a default policy used by all classes in the email package. For all of the :mod:`~email.parser` classes and the related convenience functions, and for the :cla...
be passed to various classes and methods in the email package to alter the default behavior. The settable values and their defaults are described below. There is a default policy used by all classes in the email package. For all of the :mod:`~email.parser` classes and the related convenience functions, and for the :cla...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f3a77dae-c9ac-412e-a2d9-b992d79b9575
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,681
supabase-export-v2
cc7a32d5d23f1008
.. method:: header_source_parse(sourcelines) The name is parsed as everything up to the '``:``' and returned unmodified. The value is determined by stripping leading whitespace off the remainder of the first line, joining all subsequent lines together, and stripping any trailing carriage return or linefeed character...
trusted_official_docs
CPython Docs
.. method:: header_source_parse(sourcelines) The name is parsed as everything up to the '``:``' and returned unmodified. The value is determined by stripping leading whitespace off the remainder of the first line, joining all subsequent lines together, and stripping any trailing carriage return or linefeed character...
.. method:: header_source_parse(sourcelines) The name is parsed as everything up to the '``:``' and returned unmodified. The value is determined by stripping leading whitespace off the remainder of the first line, joining all subsequent lines together, and stripping any trailing carriage return or linefeed character...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f74c2bbb-8543-43db-944e-800b8efa8fe5
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,667
supabase-export-v2
bc3c8de59676dd0e
.. attribute:: refold_source If the value for a header in the ``Message`` object originated from a :mod:`~email.parser` (as opposed to being set by a program), this attribute indicates whether or not a generator should refold that value when transforming the message back into serialized form. The possible values ar...
trusted_official_docs
CPython Docs
.. attribute:: refold_source If the value for a header in the ``Message`` object originated from a :mod:`~email.parser` (as opposed to being set by a program), this attribute indicates whether or not a generator should refold that value when transforming the message back into serialized form. The possible values ar...
.. attribute:: refold_source If the value for a header in the ``Message`` object originated from a :mod:`~email.parser` (as opposed to being set by a program), this attribute indicates whether or not a generator should refold that value when transforming the message back into serialized form. The possible values ar...
python, official-docs, cpython, P0
Local_Trusted_Corpus
f875e770-dda4-4a99-987e-959d5c1704fd
CPython Docs
file://datasets/cpython/Doc/library/email.policy.rst
unknown
2c16ed3b-31d4-4a85-8e9f-1c955feb894d
51,620
supabase-export-v2
aa51bec677058419
.. attribute:: verify_generated_headers If ``True`` (the default), the generator will raise :exc:`~email.errors.HeaderWriteError` instead of writing a header that is improperly folded or delimited, such that it would be parsed as multiple headers or joined with adjacent data. Such headers can be generated by custom ...
trusted_official_docs
CPython Docs
.. attribute:: verify_generated_headers If ``True`` (the default), the generator will raise :exc:`~email.errors.HeaderWriteError` instead of writing a header that is improperly folded or delimited, such that it would be parsed as multiple headers or joined with adjacent data. Such headers can be generated by custom ...
.. attribute:: verify_generated_headers If ``True`` (the default), the generator will raise :exc:`~email.errors.HeaderWriteError` instead of writing a header that is improperly folded or delimited, such that it would be parsed as multiple headers or joined with adjacent data. Such headers can be generated by custom ...
python, official-docs, cpython, P0
Local_Trusted_Corpus