Skip to content
Projeler
Gruplar
Parçacıklar
Yardım
Yükleniyor...
Oturum aç / Kaydol
Gezinmeyi değiştir
C
cpython
Proje
Proje
Ayrıntılar
Etkinlik
Cycle Analytics
Depo (repository)
Depo (repository)
Dosyalar
Kayıtlar (commit)
Dallar (branch)
Etiketler
Katkıda bulunanlar
Grafik
Karşılaştır
Grafikler
Konular (issue)
0
Konular (issue)
0
Liste
Pano
Etiketler
Kilometre Taşları
Birleştirme (merge) Talepleri
0
Birleştirme (merge) Talepleri
0
CI / CD
CI / CD
İş akışları (pipeline)
İşler
Zamanlamalar
Grafikler
Paketler
Paketler
Wiki
Wiki
Parçacıklar
Parçacıklar
Üyeler
Üyeler
Collapse sidebar
Close sidebar
Etkinlik
Grafik
Grafikler
Yeni bir konu (issue) oluştur
İşler
Kayıtlar (commit)
Konu (issue) Panoları
Kenar çubuğunu aç
Batuhan Osman TASKAYA
cpython
Commits
3c38e066
Kaydet (Commit)
3c38e066
authored
Kas 20, 2016
tarafından
Serhiy Storchaka
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Issue #27998: Documented bytes paths support on Windows.
üst
bb08db40
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
12 deletions
+13
-12
os.rst
Doc/library/os.rst
+11
-12
3.6.rst
Doc/whatsnew/3.6.rst
+2
-0
No files found.
Doc/library/os.rst
Dosyayı görüntüle @
3c38e066
...
@@ -2016,13 +2016,11 @@ features:
...
@@ -2016,13 +2016,11 @@ features:
always requires a system call on Unix but only requires one for
always requires a system call on Unix but only requires one for
symbolic links on Windows.
symbolic links on Windows.
On Unix, *path* can be of type :class:`str` or :class:`bytes` (either
*path* may be a :term:`path-like object`. If *path* is of type ``bytes``
directly or indirectly through the :class:`PathLike` interface; use
(directly or indirectly through the :class:`PathLike` interface),
:func:`~os.fsencode` and :func:`~os.fsdecode` to encode and decode
the type of the :attr:`~os.DirEntry.name` and :attr:`~os.DirEntry.path`
:class:`bytes` paths). On Windows, *path* must be of type :class:`str`.
attributes of each :class:`os.DirEntry` will be ``bytes``; in all other
On both systems, the type of the :attr:`~os.DirEntry.name` and
circumstances, they will be of type ``str``.
:attr:`~os.DirEntry.path` attributes of each :class:`os.DirEntry` will be of
the same type as *path*.
The :func:`scandir` iterator supports the :term:`context manager` protocol
The :func:`scandir` iterator supports the :term:`context manager` protocol
and has the following method:
and has the following method:
...
@@ -2100,8 +2098,8 @@ features:
...
@@ -2100,8 +2098,8 @@ features:
The entry's base filename, relative to the :func:`scandir` *path*
The entry's base filename, relative to the :func:`scandir` *path*
argument.
argument.
The :attr:`name` attribute will be
of the same type (``str`` or
The :attr:`name` attribute will be
``bytes`` if the :func:`scandir`
``bytes``) as the :func:`scandir` *path* argument.
Use
*path* argument is of type ``bytes`` and ``str`` otherwise.
Use
:func:`~os.fsdecode` to decode byte filenames.
:func:`~os.fsdecode` to decode byte filenames.
.. attribute:: path
.. attribute:: path
...
@@ -2111,8 +2109,8 @@ features:
...
@@ -2111,8 +2109,8 @@ features:
argument. The path is only absolute if the :func:`scandir` *path*
argument. The path is only absolute if the :func:`scandir` *path*
argument was absolute.
argument was absolute.
The :attr:`path` attribute will be
of the same type (``str`` or
The :attr:`path` attribute will be
``bytes`` if the :func:`scandir`
``bytes``) as the :func:`scandir` *path* argument.
Use
*path* argument is of type ``bytes`` and ``str`` otherwise.
Use
:func:`~os.fsdecode` to decode byte filenames.
:func:`~os.fsdecode` to decode byte filenames.
.. method:: inode()
.. method:: inode()
...
@@ -2207,7 +2205,8 @@ features:
...
@@ -2207,7 +2205,8 @@ features:
.. versionadded:: 3.5
.. versionadded:: 3.5
.. versionchanged:: 3.6
.. versionchanged:: 3.6
Added support for the :class:`~os.PathLike` interface.
Added support for the :class:`~os.PathLike` interface. Added support
for :class:`bytes` paths on Windows.
.. function:: stat(path, \*, dir_fd=None, follow_symlinks=True)
.. function:: stat(path, \*, dir_fd=None, follow_symlinks=True)
...
...
Doc/whatsnew/3.6.rst
Dosyayı görüntüle @
3c38e066
...
@@ -1196,6 +1196,8 @@ See the summary for :ref:`PEP 519 <whatsnew36-pep519>` for details on how the
...
@@ -1196,6 +1196,8 @@ See the summary for :ref:`PEP 519 <whatsnew36-pep519>` for details on how the
:mod:`os` and :mod:`os.path` modules now support
:mod:`os` and :mod:`os.path` modules now support
:term:`path-like objects <path-like object>`.
:term:`path-like objects <path-like object>`.
:func:`~os.scandir` now supports :class:`bytes` paths on Windows.
A new :meth:`~os.scandir.close` method allows explicitly closing a
A new :meth:`~os.scandir.close` method allows explicitly closing a
:func:`~os.scandir` iterator. The :func:`~os.scandir` iterator now
:func:`~os.scandir` iterator. The :func:`~os.scandir` iterator now
supports the :term:`context manager` protocol. If a :func:`scandir`
supports the :term:`context manager` protocol. If a :func:`scandir`
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment