Hi Frank,
On 15 December 2016 at 21:06, Frank Wang <[email protected]> wrote:
> Right now, I know W_Root has no __init__ function, and when I try to add
> one. I run into all sorts of problems because TypeDef calls W_Root.__new__
> with some parameters, but "new" function seems to be called nowhere else.
I suspect there is no clean way to add a __init__() method to W_Root.
You could use default attributes instead:
class W_Root:
_my_extra_dict = None
def get_extra_dict(self):
if self._my_extra_dict is None:
self._my_extra_dict = {}
return self._my_extra_dict
A bientôt,
Armin.
_______________________________________________
pypy-dev mailing list
[email protected]
https://mail.python.org/mailman/listinfo/pypy-dev