GeezerVisonThe World Wide Web, restored to 800 pixels of glory. |
| Home|About|Gaming cabinet|Archives|How it works|Starter sites |
GeezerVison is showing github.com — Use lazy imports in argparse · Issue #154638 · python/cpython Closed Labels 3.16new features, bugs and security fixesnew features, bugs and security fixesperformancePerformance or resource usagePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory Descriptionargparse currently defers importing copy, difflib, shutil, textwrap, and warnings using inline imports, while importing re and gettext eagerly at module scope. I think these can safely be replaced with module-level explicit lazy imports, which will make the module’s dependencies more readable and reduce the cost of a bare import argparse. On my machine, preliminary release-build measurements using -S -X importtime show the median cumulative import time for argparse decreasing by approximately 67%, from 4,792 µs to 1,595 µs across 15 alternating runs. Linked PRsActivity
MetadataMetadataAssigneesLabels3.16new features, bugs and security fixesnew features, bugs and security fixesperformancePerformance or resource usagePerformance or resource usagestdlibStandard Library Python modules in the Lib/ directoryStandard Library Python modules in the Lib/ directory Projects
MilestoneRelationshipsDevelopmentIssue actions |
| You are visitor 01402503 — GeezerVison does not store the pages you look up. Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required. |