Visitar URL original
Clarify inefficiency of iterating over set literals by hunterhogan · Pull Request #24002 · astral-sh/ruff · GitHub
Skip to content

Clarify inefficiency of iterating over set literals - #24002

Closed
hunterhogan wants to merge 1 commit into
astral-sh:mainfrom
hunterhogan:patch-1
Closed

hunterhogan wants to merge 1 commit into
astral-sh:mainfrom
hunterhogan:patch-1

Conversation

@hunterhogan

Copy link
Copy Markdown
Contributor

Summary

Updated documentation to clarify the inefficiency of iterating over set literals compared to list and tuple literals.

Test Plan

How was it tested?

Eyeballs

Updated documentation to clarify the inefficiency of iterating over set literals compared to list and tuple literals.
@astral-sh-bot
astral-sh-bot Bot requested a review from ntBre March 16, 2026 16:05
@ntBre

ntBre commented Mar 16, 2026

Copy link
Copy Markdown
Contributor

Could you say more about the motivation for this change? It doesn't seem like a clear improvement to me.

@astral-sh-bot

astral-sh-bot Bot commented Mar 16, 2026

Copy link
Copy Markdown

ruff-ecosystem results

Linter (stable)

✅ ecosystem check detected no linter changes.

Linter (preview)

✅ ecosystem check detected no linter changes.

@ntBre ntBre added the documentation Improvements or additions to public-facing documentation label Mar 16, 2026
@hunterhogan

Copy link
Copy Markdown
Contributor Author

Could you say more about the motivation for this change? It doesn't seem like a clear improvement to me.

Motivation to redraft: clarifying the rule.

@amyreese proved that the text needs improvement: I read the original text, spent a couple of hours researching this, and read the comments left by @amyreese; nevertheless, my technical explanation is either the same or worse than the current draft.

The writing errors and poor style in the original text did not motivate me to redraft it. The copywriting at Astral is easily the best writing in the Python ecosystem. I don't like to make claims I can't support, so I won't say it is the best I've read in all of IT. I read countless documents at Dell, for example, and when I wrote an intensive six-month training curriculum at a technical school.

@ntBre

ntBre commented Mar 17, 2026

Copy link
Copy Markdown
Contributor

Thank you very much for the kind words and for looking into this!

I think I'll close this for now since we don't have consensus on this being an improvement.

@ntBre ntBre closed this Mar 17, 2026
@hunterhogan
hunterhogan deleted the patch-1 branch March 17, 2026 18:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to public-facing documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants