Tin mới
barneygale:gh-101000-splitroot
GitHub CopilotWrite better code with AI
GitHub Copilot appDirect agents from issue to merge
CodespacesInstant dev environments
Code ReviewManage code changes
Code QualityEnforce quality at merge
GitHub Advanced SecurityFind and fix vulnerabilities
Code securitySecure your code as you build
Secret protectionStop leaks before they start
GitHub SponsorsFund open source developers
Copilot for BusinessEnterprise-grade AI features
Premium SupportEnterprise-grade 24/7 support
Add os.path.splitroot() function #101000
Use splitroot() from posixpath
Learn more about hiding disruptive comments
The reason will be displayed to describe this comment to others. Learn more.
Correct and expand examples in splitroot() docstring
Use splitroot() from pathlib.PurePath.with_name()
Reduce ntpath.normpath() diff noise
Simplify ntpath.commonpath() now that 'isabs' is unused.
Reduce posixpath.normpath() diff noise
Simplify ntpath.splitroot() slightly
Apply suggestions from code review
Update Doc/library/os.path.rst
Note that drive may be empty on Windows
cpython/Lib/test/test_ntpath.py
Update Doc/library/os.path.rst
Add tests for bytes (POSIX only) and path-like objects (both platforms)