martin.v.loewis
2008-10-07 06:36:32 UTC
Author: martin.v.loewis
Date: Tue Oct 7 08:36:31 2008
New Revision: 66829
Log:
Patch #3187 (file 11721): Document byte vs. string parameters
and results.
Modified:
python/branches/py3k/Doc/library/os.rst
Modified: python/branches/py3k/Doc/library/os.rst
==============================================================================
--- python/branches/py3k/Doc/library/os.rst (original)
+++ python/branches/py3k/Doc/library/os.rst Tue Oct 7 08:36:31 2008
@@ -693,13 +693,13 @@
.. function:: getcwd()
- Return a bytestring representing the current working directory.
+ Return a string representing the current working directory.
Availability: Unix, Windows.
-.. function:: getcwdu()
+.. function:: getcwdb()
- Return a string representing the current working directory.
+ Return a bytestring representing the current working directory.
Availability: Unix, Windows.
@@ -801,8 +801,10 @@
``'..'`` even if they are present in the directory. Availability:
Unix, Windows.
- On Windows NT/2k/XP and Unix, if *path* is a Unicode object, the result will be
- a list of Unicode objects.
+ If *path* is a Unicode object, the result will be a list of Unicode objects.
+ If a filename can not be decoded to unicode, it is skipped. If *path* is a
+ bytes string, the result will be list of bytes objects included files
+ skipped by the unicode version.
.. function:: lstat(path)
@@ -916,7 +918,9 @@
be converted to an absolute pathname using ``os.path.join(os.path.dirname(path),
result)``.
- If the *path* is a Unicode object, the result will also be a Unicode object.
+ If the *path* is an Unicode object, the result will also be a Unicode object
+ and may raise an UnicodeDecodeError. If the *path* is a bytes object, the
+ result will be a bytes object.
Availability: Unix.
Date: Tue Oct 7 08:36:31 2008
New Revision: 66829
Log:
Patch #3187 (file 11721): Document byte vs. string parameters
and results.
Modified:
python/branches/py3k/Doc/library/os.rst
Modified: python/branches/py3k/Doc/library/os.rst
==============================================================================
--- python/branches/py3k/Doc/library/os.rst (original)
+++ python/branches/py3k/Doc/library/os.rst Tue Oct 7 08:36:31 2008
@@ -693,13 +693,13 @@
.. function:: getcwd()
- Return a bytestring representing the current working directory.
+ Return a string representing the current working directory.
Availability: Unix, Windows.
-.. function:: getcwdu()
+.. function:: getcwdb()
- Return a string representing the current working directory.
+ Return a bytestring representing the current working directory.
Availability: Unix, Windows.
@@ -801,8 +801,10 @@
``'..'`` even if they are present in the directory. Availability:
Unix, Windows.
- On Windows NT/2k/XP and Unix, if *path* is a Unicode object, the result will be
- a list of Unicode objects.
+ If *path* is a Unicode object, the result will be a list of Unicode objects.
+ If a filename can not be decoded to unicode, it is skipped. If *path* is a
+ bytes string, the result will be list of bytes objects included files
+ skipped by the unicode version.
.. function:: lstat(path)
@@ -916,7 +918,9 @@
be converted to an absolute pathname using ``os.path.join(os.path.dirname(path),
result)``.
- If the *path* is a Unicode object, the result will also be a Unicode object.
+ If the *path* is an Unicode object, the result will also be a Unicode object
+ and may raise an UnicodeDecodeError. If the *path* is a bytes object, the
+ result will be a bytes object.
Availability: Unix.