python / python/cpython

Inconsistent documentation: are interned strings immortal or not?

Open
#144,161 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

docs
Dominant language
Python
Stars
77.2k
Forks
35.9k
PR merge metrics
PR metrics pending

Description

Documentation

From HOWTO about python free-threading:

As of the 3.14 release, immortalization is limited to:

  • Code constants: numeric literals, string literals, and tuple literals composed of other constants.
  • Strings interned by sys.intern().

From sys.intern():

Interned strings are not immortal; you must keep a reference to the return value of intern() around to benefit from it.

So, are the interned strings immortal or not?

Linked PRs
  • gh-144176

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by comparing the immortalization section in the free-threading HOWTO with the sys.intern() documentation and the linked PR gh-144176. Check which statement reflects the documented behavior, then update the conflicting documentation so both sections agree and verify the rendered wording.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
documentation
Issue type
Documentation
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.