<p dir="ltr"><br>
On 26 Feb 2014 07:04, "r.david.murray" <<a href="mailto:python-checkins@python.org">python-checkins@python.org</a>> wrote:<br>
><br>
> <a href="http://hg.python.org/cpython/rev/4cd620d8c3f6">http://hg.python.org/cpython/rev/4cd620d8c3f6</a><br>
> changeset:   89392:4cd620d8c3f6<br>
> user:        R David Murray <<a href="mailto:rdmurray@bitdance.com">rdmurray@bitdance.com</a>><br>
> date:        Tue Feb 25 16:03:14 2014 -0500<br>
> summary:<br>
>   whatsnew: DynanicClassAttribute (#19030), Py_SetStandardStreamEncoding (#16129)<br>
><br>
> Adding missing docs for DynamicClassAttribute by copying the docstring.  The<br>
> doc entry could stand some expansion, which I will note on the issue.<br>
><br>
> files:<br>
>   Doc/library/types.rst |  21 +++++++++++++++++++++<br>
>   Doc/whatsnew/3.4.rst  |  17 +++++++++++++++++<br>
>   2 files changed, 38 insertions(+), 0 deletions(-)<br>
><br>
><br>
> diff --git a/Doc/library/types.rst b/Doc/library/types.rst<br>
> --- a/Doc/library/types.rst<br>
> +++ b/Doc/library/types.rst<br>
> @@ -15,6 +15,9 @@<br>
>  Python interpreter, but not exposed as builtins like :class:`int` or<br>
>  :class:`str` are.<br>
><br>
> +Finally, it provides some additional type-related utility classes and functions<br>
> +that are not fundamental enough to be builtins.<br>
> +<br>
><br>
>  Dynamic Type Creation<br>
>  ---------------------<br>
> @@ -220,6 +223,9 @@<br>
>        Return a new view of the underlying mapping's values.<br>
><br>
><br>
> +Additional Utility Classes and Functions<br>
> +----------------------------------------<br>
> +<br>
>  .. class:: SimpleNamespace<br>
><br>
>     A simple :class:`object` subclass that provides attribute access to its<br>
> @@ -246,3 +252,18 @@<br>
>     instead.<br>
><br>
>     .. versionadded:: 3.3<br>
> +<br>
> +<br>
> +.. function:: DynamicClassAttribute(fget=None, fset=None, fdel=None, doc=None)<br>
> +<br>
> +   Route attribute access on a class to __getattr__.<br>
> +<br>
> +   This is a descriptor, used to define attributes that act differently when<br>
> +   accessed through an instance and through a class.  Instance access remains<br>
> +   normal, but access to an attribute through a class will be routed to the<br>
> +   class's __getattr__ method; this is done by raising AttributeError.<br>
> +<br>
> +   This allows one to have properties active on an instance, and have virtual<br>
> +   attributes on the class with the same name (see Enum for an example).<br>
> +<br>
> +   .. versionadded:: 3.4<br>
> diff --git a/Doc/whatsnew/3.4.rst b/Doc/whatsnew/3.4.rst<br>
> --- a/Doc/whatsnew/3.4.rst<br>
> +++ b/Doc/whatsnew/3.4.rst<br>
> @@ -1270,6 +1270,17 @@<br>
>  :issue:`1565525`).<br>
><br>
><br>
> +types<br>
> +-----<br>
> +<br>
> +A new :func:`~types.DynamicClassAttribute` descriptor provides a way to define<br>
> +an attribute that acts normally when looked up through an instance object, but<br>
> +which is routed to the *class* ``__getattr__`` when looked up through the<br>
> +class.  This allows one to have properties active on a class, and have virtual<br>
> +attributes on the class with the same name (see :mod:`Enum` for an example).<br>
> +(Contributed by Ethan Furman in :issue:`19030`.)<br>
> +<br>
> +<br>
>  urllib<br>
>  ------<br>
><br>
> @@ -1512,6 +1523,12 @@<br>
>    object allocator have been silenced.  (Contributed by Dhiru Kholia in<br>
>    :issue:`18596`.)<br>
><br>
> +* New function :c:func:`Py_SetStandardStreamEncoding` allows an application<br>
> +  that is embedding Python to do the equivalent of setting<br>
> +  :envvar:`PYTHONIOENCODING`.  Its arguments override the equivalent<br>
> +  values from :envvar:`PYTHONIOENCODING` if it exists.  (Contributed<br>
> +  by Bastien Montagne and Nick Coghlan in :issue:`16129`.)<br>
> +</p>
<p dir="ltr">There was an existing entry for this one: second bullet under <a href="http://docs.python.org/dev/whatsnew/3.4.html#other-build-and-c-api-changes">http://docs.python.org/dev/whatsnew/3.4.html#other-build-and-c-api-changes</a></p>

<p dir="ltr">Cheers,<br>
Nick.</p>
<p dir="ltr">><br>
>  .. _other-improvements-3.4:<br>
><br>
><br>
> --<br>
> Repository URL: <a href="http://hg.python.org/cpython">http://hg.python.org/cpython</a><br>
><br>
> _______________________________________________<br>
> Python-checkins mailing list<br>
> <a href="mailto:Python-checkins@python.org">Python-checkins@python.org</a><br>
> <a href="https://mail.python.org/mailman/listinfo/python-checkins">https://mail.python.org/mailman/listinfo/python-checkins</a><br>
><br>
</p>