Message314650
As noted in https://docs.python.org/3/reference/datamodel.html?#creating-the-class-object, implementing PEP 487 required the introduction of __classcell__ as a way for __build_class__ to pass the zero-arg super() cell object through to type.__new__.
Now that Python 3.7+ offers context variables, we may be able to design a more robust (and better hidden) alternative which stashes the "current zero-arg super cell object" in a context variable, allowing type.__new__ to retrieve it when needed, without having to pass it through the class body execution namespace. |
|
Date |
User |
Action |
Args |
2018-03-29 14:15:52 | ncoghlan | set | recipients:
+ ncoghlan, petr.viktorin, yselivanov, Martin.Teichmann |
2018-03-29 14:15:52 | ncoghlan | set | messageid: <1522332952.84.0.467229070634.issue33179@psf.upfronthosting.co.za> |
2018-03-29 14:15:52 | ncoghlan | link | issue33179 messages |
2018-03-29 14:15:52 | ncoghlan | create | |
|