Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Use frozenmap in curses/has_key.py
  • Loading branch information
jonathandung authored Mar 19, 2026
commit 540afcde594397208cda2c53ec3a3edd25ae2fcd
4 changes: 2 additions & 2 deletions Lib/curses/has_key.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

# Table mapping curses keys to the terminfo capability name

_capability_names = {
_capability_names = frozenmap({
_curses.KEY_A1: 'ka1',
_curses.KEY_A3: 'ka3',
_curses.KEY_B2: 'kb2',
Expand Down Expand Up @@ -157,7 +157,7 @@
_curses.KEY_SUSPEND: 'kspd',
_curses.KEY_UNDO: 'kund',
_curses.KEY_UP: 'kcuu1'
}
})

def has_key(ch):
if isinstance(ch, str):
Expand Down