Skip to content
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 our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-102628: Fix sqlite3 CLI prompt in IDLE on Windows #103945

Merged
merged 4 commits into from Apr 27, 2023

Conversation

erlend-aasland
Copy link
Contributor

@erlend-aasland erlend-aasland commented Apr 27, 2023

@erlend-aasland
Copy link
Contributor Author

Skipping NEWS; the entry from #103898 covers this PR also.

Copy link
Member

@terryjreedy terryjreedy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would have just modified the conditional expression, wherever located by adding and 'idlelib.run' not in sys.modules. platform and the idlelib condition are effectively constants.

Or reversed the condition as you did to
eofkey = "CTRL-D" if sys.platform != "win32" or "idlelib.run" in sys.modules else "CTRL-Z"
I agree that 'default if this or that else special' is easier to read.

@erlend-aasland
Copy link
Contributor Author

Thanks; I modified the condition and blew it up to a full if...else, I believe it looks better like that. The inlined if got way too long IMO.

@erlend-aasland erlend-aasland enabled auto-merge (squash) April 27, 2023 21:05
@erlend-aasland erlend-aasland merged commit 56c7176 into python:main Apr 27, 2023
16 checks passed
@erlend-aasland erlend-aasland deleted the sqlite-cli-prompt-idle branch April 27, 2023 21:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Prompt text in sqlite3 CLI (new in 3.12) is Linux oriented and doesn't apply to Windows
3 participants