FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

[3.14] gh-40038: Quote imaplib command arguments when necessary (GH-152703) by serhiy-storchaka · Pull Request #153069 · python/cpython · GitHub

/ cpython Public
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .py  (2) .rst  (2) All 2 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
7 changes: 5 additions & 2 deletions Doc/library/imaplib.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -194,6 +194,9 @@ enclosed with either parentheses or double quotes) each string is quoted.
However, the *password* argument to the ``LOGIN`` command is always quoted. If
you want to avoid having an argument string quoted (eg: the *flags* argument to
``STORE``) then enclose the string in parentheses (eg: ``r'(\Deleted)'``).
In general, pass arguments unquoted and let the module quote them as needed.
An argument that is already enclosed in double quotes is left unchanged,
so that code which quotes arguments itself keeps working.

Most commands return a tuple: ``(type, [data, ...])`` where *type* is usually
``'OK'`` or ``'NO'``, and *data* is either the text from the command response,
Expand Down Expand Up @@ -402,7 +405,7 @@ An :class:`IMAP4` instance has the following methods:
.. versionadded:: 3.14


.. method:: IMAP4.list([directory[, pattern]])
.. method:: IMAP4.list(directory='', pattern='*')

List mailbox names in *directory* matching *pattern*. *directory* defaults to
the top-level mail folder, and *pattern* defaults to match anything. Returned
Expand Down Expand Up @@ -432,7 +435,7 @@ An :class:`IMAP4` instance has the following methods:
The method no longer ignores silently arbitrary exceptions.


.. method:: IMAP4.lsub(directory='""', pattern='*')
.. method:: IMAP4.lsub(directory='', pattern='*')

List subscribed mailbox names in directory matching pattern. *directory*
defaults to the top level directory and *pattern* defaults to match any mailbox.
Expand Down
Loading
Loading

Back | FazBrowse Home | New Git URL