On 07/29/2016 08:01 AM, Martin Teichmann wrote:
... Also, while researching other
people's code when I wrote PEP 487, I couldn't find any such code
elsewhere, yet I found a lot of code where people took the wildest
measure to prevent a metaclass in doing its job on the first class it
is used
I have started [1] writing documentation for the new PEP 495 (Local
Time Disambiguation) features and ran into the following problem. The
current documentation is rather inconsistent in presenting the method
signatures. For example:
date.replace(year, month, day) [2], but
Hi Sylvain,
thanks for the example, it's a great example to illustrate PEP 487 and
its design decisions.
> What it does is setting some class attributes that are required for certain
> types of descriptors to be able to initialize themselves.
>
> class MetaHasTraits(MetaHasDescriptors):
>
>
ACTIVITY SUMMARY (2016-07-22 - 2016-07-29)
Python tracker at http://bugs.python.org/
To view or respond to any of the issues listed below, click on the issue.
Do NOT respond to this message.
Issues counts and deltas:
open5588 ( +2)
closed 33818 (+56)
total 39406 (+58)
Open issues
In the traitlets library I mentioned earlier, we do have a need for this.
The corresponding function is called `setup_class`.
What it does is setting some class attributes that are required for certain
types of descriptors to be able to initialize themselves.
class
Hello,
there has been quite some discussion on why PEP 487's
__init_subclass__ initializes subclasses, and not the class itself. I
think the most important details have been already thoroughly
discussed here.
One thing I was missing in the discussion is practical examples. I
have been using PEP