Hi,
On 30 January 2018 at 13:13, Antonio Cuni wrote:
> sidenote: if you do the following, you can replace the __dict__ without
> incurring into performance penalties (Armin, please correct me if I'm
> wrong):
>
> import __pypy__
> def __init__(self):
> self.__dict__ = __pypy__.newdict('instan
sidenote: if you do the following, you can replace the __dict__ without
incurring into performance penalties (Armin, please correct me if I'm
wrong):
import __pypy__
def __init__(self):
self.__dict__ = __pypy__.newdict('instance')
this is not directly useful for your use case (because newdict
Thanks a lot, Armin. If we go this way, it's easy to special case PyPy.
On Mon, Jan 29, 2018 at 2:42 PM Armin Rigo wrote:
> Hi,
>
> On 29 January 2018 at 11:22, Tin Tvrtković wrote:
> > It's just that doing it this way is unconventional and a little scary.
> Would
> > we be violating a Python r
Hi,
On 29 January 2018 at 11:22, Tin Tvrtković wrote:
> It's just that doing it this way is unconventional and a little scary. Would
> we be violating a Python rule somewhere and making stuff blow up later if we
> went this way?
No, it's semantically fine. But it comes with a heavy penalty on
P
Hello,
this question is not directly related to PyPy but to general Python
semantics. I'm posting it here since I know there are very knowledgeable
people here and honestly this is the friendliest list for questions like
this.
I'm working on optimizing __init__s that the attrs library generates.