Pelokalan
Python ID
id en
Sign in
Project
whatsnew__3-4.po Project files · python-docs-id-3.14 · Bahasa Indonesia
Module PO View only
Source text — English
Translation — Bahasa Indonesia
:mod:`enum`: :ref:`Support for enumeration types <whatsnew-enum>` (:pep:`435`).
Since it was first introduced, the :mod:`codecs` module has always been intended to operate as a type-neutral dynamic encoding and decoding system. However, its close coupling with the Python text model, especially the type restricted convenience methods on the builtin :class:`str`, :class:`bytes` and :class:`bytearray` types, has historically obscured that fact.
The new :mod:`enum` module (defined in :pep:`435`) provides a standard implementation of enumeration types, allowing other modules (such as :mod:`socket`) to provide more informative error messages and better debugging support by replacing opaque integer constants with backwards compatible enumeration values.
:func:`~inspect.signature` now supports duck types of CPython functions, which adds support for functions compiled with Cython. (Contributed by Stefan Behnel and Yury Selivanov in :issue:`17159`.)
types
types
A new :func:`~types.DynamicClassAttribute` descriptor provides a way to define an attribute that acts normally when looked up through an instance object, but which is routed to the *class* ``__getattr__`` when looked up through the class. This allows one to have properties active on a class, and have virtual attributes on the class with the same name (see :mod:`enum` for an example). (Contributed by Ethan Furman in :issue:`19030`.)