Skip to content

Commit

Permalink
Don't intern unchanged IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
TeamSpen210 committed Jul 10, 2024
1 parent cf40495 commit 3f38350
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,8 @@ def _uppercase_casefold(value: str) -> str:
"""Casefold and uppercase."""
casefolded = value.casefold().upper()
if casefolded == value:
return sys.intern(value)
# Don't intern, we want to preserve identify with the caller here.
return value
else:
return sys.intern(casefolded)

Expand Down

0 comments on commit 3f38350

Please sign in to comment.