diff options
author | Brian Curtin <brian@python.org> | 2011-06-09 09:46:21 -0500 |
---|---|---|
committer | Brian Curtin <brian@python.org> | 2011-06-09 09:46:21 -0500 |
commit | d9463b233c5fefbda3f1b9f2b37f7ff78a7c88ff (patch) | |
tree | 21c17b5c3a1b39ea3bf41110fb49f0e1332e6083 | |
parent | 577a6af8e6b715e6b46e92cf14603a266fc361a8 (diff) | |
parent | 95d028fd18fc33ceac8b2727a1e9fe3d4a8256b8 (diff) | |
download | cpython-git-d9463b233c5fefbda3f1b9f2b37f7ff78a7c88ff.tar.gz |
Merge 3.2
-rw-r--r-- | Lib/ntpath.py | 8 | ||||
-rw-r--r-- | Modules/posixmodule.c | 5 |
2 files changed, 7 insertions, 6 deletions
diff --git a/Lib/ntpath.py b/Lib/ntpath.py index 2483ced7ff..826be87d3c 100644 --- a/Lib/ntpath.py +++ b/Lib/ntpath.py @@ -679,9 +679,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 diff --git a/Modules/posixmodule.c b/Modules/posixmodule.c index f9b3a43167..bfdf5cdc89 100644 --- a/Modules/posixmodule.c +++ b/Modules/posixmodule.c @@ -2961,6 +2961,9 @@ posix__getfileinformation(PyObject *self, PyObject *args) info.nFileIndexLow); } +PyDoc_STRVAR(posix__isdir__doc__, +"Return true if the pathname refers to an existing directory."); + static PyObject * posix__isdir(PyObject *self, PyObject *args) { @@ -9597,7 +9600,7 @@ static PyMethodDef posix_methods[] = { {"_getfullpathname", posix__getfullpathname, METH_VARARGS, NULL}, {"_getfinalpathname", posix__getfinalpathname, METH_VARARGS, NULL}, {"_getfileinformation", posix__getfileinformation, METH_VARARGS, NULL}, - {"_isdir", posix__isdir, METH_VARARGS, NULL}, + {"_isdir", posix__isdir, METH_VARARGS, posix__isdir__doc__}, #endif #ifdef HAVE_GETLOADAVG {"getloadavg", posix_getloadavg, METH_NOARGS, posix_getloadavg__doc__}, |