8000 gh-121423: Improve import time of `socket` by writing `socket.errorTab` as a constant and lazy import modules by Wulian233 · Pull Request #121424 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-121423: Improve import time of socket by writing socket.errorTab as a constant and lazy import modules #121424

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

Merged
merged 12 commits into from
Sep 4, 2024
Prev Previous commit
Next Next commit
lower().startswith("win")
  • Loading branch information
Wulian233 authored Jul 6, 2024
commit 1823c9aa8f26dfce45c4c9329d48f90fbd7f7e93
2 changes: 1 addition & 1 deletion Lib/socket.py
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ def _intenum_converter(value, enum_klass):


# WSA error codes
if sys.platform == "win32":
if sys.platform.lower().startswith("win"):
errorTab = {
6: "Specified event object handle is invalid.",
8: "Insufficient memory available.",
Expand Down
Loading
0