mirror of
https://github.com/python/cpython.git
synced 2025-08-19 00:00:48 +00:00
Correction to f1509fc75435 - Issue #11583
Rather than wrapping the C _isdir function in a Python function, just import the C _isdir function directly. Additionally, add in the docstring which was left out.
This commit is contained in:
parent
5cf8660f0b
commit
5446f08c60
2 changed files with 7 additions and 6 deletions
|
@ -527,9 +527,7 @@ try:
|
|||
# attribute to tell whether or not the path is a directory.
|
||||
# This is overkill on Windows - just pass the path to GetFileAttributes
|
||||
# and check the attribute from there.
|
||||
from nt import _isdir
|
||||
from nt import _isdir as isdir
|
||||
except ImportError:
|
||||
from genericpath import isdir as _isdir
|
||||
|
||||
def isdir(path):
|
||||
return _isdir(path)
|
||||
# Use genericpath.isdir as imported above.
|
||||
pass
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue