|
Original |
Translation |
|
2901
|
The :class:`ftplib.FTP` class now supports the context manager protocol (Contributed by Tarek Ziadé and Giampaolo Rodolà; :issue:`4972`.)
|
|
|
2902
|
The previously deprecated :func:`string.maketrans` function has been removed in favor of the static methods, :meth:`bytes.maketrans` and :meth:`bytearray.maketrans`. This change solves the confusion around which types were supported by the :mod:`string` module. Now, :class:`str`, :class:`bytes`, and :class:`bytearray` each have their own **maketrans** and **translate** methods with intermediate translation tables of the appropriate type.
|
|
|
2903
|
The previously deprecated :func:`contextlib.nested` function has been removed in favor of a plain :keyword:`with` statement which can accept multiple context managers. The latter technique is faster (because it is built-in), and it does a better job finalizing multiple context managers when one of them raises an exception.
|
|
|
2904
|
The :func:`shutil.copytree` function has two new options:
|
|
|
2905
|
|
2906
|
*copy_function*: a callable that will be used to copy files. :func:`shutil.copy2` is used by default.
|
|
|
2907
|
(Contributed by Tarek Ziade.)
|
|
|
2908
|
The *sqlite3* module has some new features:
|
Le module *sqlite3* a quelques nouvelles fonctionnalités :
|
|
2909
|
XXX *enable_load_extension*
|
|
|
2910
|
|
|