Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

gh-146153: Usefrozendict in pure python fallback forcurses.has_key#146154

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
vstinner merged 14 commits intopython:mainfromjonathandung:patch-1
Mar 21, 2026
Merged
Changes fromall commits
Commits
Show all changes
14 commits
Select commitHold shift + click to select a range
540afcd
Use frozenmap in curses/has_key.py
jonathandungMar 19, 2026
c51e72c
Remove whitespace surrounding parentheses
jonathandungMar 19, 2026
8518484
Merge branch 'python:main' into patch-1
jonathandungMar 19, 2026
805dcb2
📜🤖 Added by blurb_it.
blurb-it[bot]Mar 19, 2026
6f25f93
Edit news
jonathandungMar 19, 2026
4891f62
Update 2026-03-19-08-48-21.gh-issue-146153.UTK9Mb.rst
jonathandungMar 19, 2026
256374f
Fix linter error
jonathandungMar 19, 2026
c34da91
It's called frozendict
jonathandungMar 19, 2026
c2aebbb
Update 2026-03-19-08-48-21.gh-issue-146153.UTK9Mb.rst
jonathandungMar 19, 2026
16d4d2c
Merge branch 'main' into patch-1
jonathandungMar 19, 2026
f4fec4c
Merge branch 'main' into patch-1
jonathandungMar 19, 2026
52652d6
Delete Misc/NEWS.d/next/Library/2026-03-19-08-48-21.gh-issue-146153.U…
jonathandungMar 19, 2026
7643a04
Merge branch 'main' into patch-1
jonathandungMar 19, 2026
d4e4f37
Merge branch 'main' into patch-1
jonathandungMar 19, 2026
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
6 changes: 3 additions & 3 deletionsLib/curses/has_key.py
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -7,7 +7,7 @@

# Table mapping curses keys to the terminfo capability name

_capability_names = {
_capability_names =frozendict({
_curses.KEY_A1: 'ka1',
_curses.KEY_A3: 'ka3',
_curses.KEY_B2: 'kb2',
Expand DownExpand 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 All@@ -170,7 +170,7 @@ def has_key(ch):

#Check the current terminal description for that capability;
#if present, return true, else return false.
if _curses.tigetstr(capability_name):
if _curses.tigetstr(capability_name):
return True
else:
return False
Expand Down
Loading

[8]ページ先頭

©2009-2026 Movatter.jp