Skip to content

gh-67512: Document IMAP4.append() flags argument#149907

Open
savagemechanic wants to merge 1 commit into
python:mainfrom
savagemechanic:gh-67512-document-imaplib-append-flags
Open

gh-67512: Document IMAP4.append() flags argument#149907
savagemechanic wants to merge 1 commit into
python:mainfrom
savagemechanic:gh-67512-document-imaplib-append-flags

Conversation

@savagemechanic
Copy link
Copy Markdown

@savagemechanic savagemechanic commented May 16, 2026

Clarify the type and format expected for the flags argument to imaplib.IMAP4.append().

The current documentation names the argument but does not explain that it should be an IMAP flag string. This can lead readers to pass a Python tuple or list of flags, which does not match the API. The updated text documents that flags may be None or a string of IMAP flag tokens, shows a multi-flag example, and notes that parentheses are added automatically when omitted.

Docs-only change.

Testing:

  • make -C Doc check
  • ./Doc/venv/bin/pre-commit run sphinx-lint --files Doc/library/imaplib.rst

@savagemechanic savagemechanic requested a review from a team as a code owner May 16, 2026 02:28
@python-cla-bot
Copy link
Copy Markdown

python-cla-bot Bot commented May 16, 2026

All commit authors signed the Contributor License Agreement.

CLA signed

@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community Bot commented May 16, 2026

Documentation build overview

📚 cpython-previews | 🛠️ Build #32714101 | 📁 Comparing 43ef5ad against main (e56ae81)

  🔍 Preview build  

1 file changed
± library/imaplib.html

@savagemechanic savagemechanic force-pushed the gh-67512-document-imaplib-append-flags branch from 2cdbe5e to 43ef5ad Compare May 16, 2026 02:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

awaiting review docs Documentation in the Doc dir skip news

Projects

Status: Todo

Development

Successfully merging this pull request may close these issues.

1 participant