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
bcbd6966
Kaydet (Commit)
bcbd6966
authored
Eyl 05, 2010
tarafından
Raymond Hettinger
Dosyalara gözat
Seçenekler
Dosyalara Gözat
İndir
Eposta Yamaları
Sade Fark
Add example of ftplib's new context manager.
üst
ef2335ca
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
4 deletions
+19
-4
3.2.rst
Doc/whatsnew/3.2.rst
+19
-4
No files found.
Doc/whatsnew/3.2.rst
Dosyayı görüntüle @
bcbd6966
...
@@ -216,7 +216,7 @@ Some smaller changes made to the core Python language are:
...
@@ -216,7 +216,7 @@ Some smaller changes made to the core Python language are:
:issue:`8814`.)
:issue:`8814`.)
* The :mod:`abc` module now supports :func:`abstractclassmethod` and
* The :mod:`abc` module now supports :func:`abstractclassmethod` and
:func:`staticmethod`.
:func:`
abstract
staticmethod`.
(:issue:`5867`)
(:issue:`5867`)
...
@@ -261,6 +261,20 @@ New, Improved, and Deprecated Modules
...
@@ -261,6 +261,20 @@ New, Improved, and Deprecated Modules
`appspot issue 53094 <http://codereview.appspot.com/53094>`_.)
`appspot issue 53094 <http://codereview.appspot.com/53094>`_.)
* The :class:`ftplib.FTP` class now supports the context manager protocol
* The :class:`ftplib.FTP` class now supports the context manager protocol
to unconditionally consume :exc:`socket.error` exceptions and to close
the ftp connection when done::
>>> from ftplib import FTP
>>> with FTP("ftp1.at.proftpd.org") as ftp:
... ftp.login()
... ftp.dir()
...
'230 Anonymous login ok, restrictions apply.'
dr-xr-xr-x 9 ftp ftp 154 May 6 10:43 .
dr-xr-xr-x 9 ftp ftp 154 May 6 10:43 ..
dr-xr-xr-x 5 ftp ftp 4096 May 6 10:43 CentOS
dr-xr-xr-x 3 ftp ftp 18 Jul 10 2008 Fedora
(Contributed by Tarek Ziadé and Giampaolo Rodolà; :issue:`4972`.)
(Contributed by Tarek Ziadé and Giampaolo Rodolà; :issue:`4972`.)
* A warning message will now get printed at interpreter shutdown if
* A warning message will now get printed at interpreter shutdown if
...
@@ -270,16 +284,17 @@ New, Improved, and Deprecated Modules
...
@@ -270,16 +284,17 @@ New, Improved, and Deprecated Modules
* The :mod:`os` module now has the :const:`ST_RDONLY` and :const:`ST_NOSUID`
* The :mod:`os` module now has the :const:`ST_RDONLY` and :const:`ST_NOSUID`
constants, for use with the :func:`~os.statvfs` function.
constants, for use with the :func:`~os.statvfs` function.
(Patch by Adam Jackson; :issue:`7647`.)
(Patch by Adam Jackson; :issue:`7647`.)
* The :func:`shutil.copytree` function has two new options:
* The :func:`shutil.copytree` function has two new options:
* *ignore_dangling_symlinks*: when ``symlinks=False``
(meaning
that the
* *ignore_dangling_symlinks*: when ``symlinks=False``
dp
that the
function copies the file pointed to by the symlink, not the symlink
function copies the file pointed to by the symlink, not the symlink
itself
) t
his option will silence the error raised if the file doesn't
itself
. T
his option will silence the error raised if the file doesn't
exist.
exist.
* *copy_function*: a callable that will be used to copy files.
* *copy_function*:
is
a callable that will be used to copy files.
:func:`shutil.copy2` is used by default.
:func:`shutil.copy2` is used by default.
(Contributed by Tarek Ziadé.)
(Contributed by Tarek Ziadé.)
...
...
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