Serhiy Storchaka <[email protected]> added the comment:
But the following class should not lead to unlimited memory consumption when
create new instances:
class C:
count = 0
def __init__(self):
count = self.__class__.count
self.__class__.count = count + 1
setattr(self, f'a{count}', count)
----------
nosy: +serhiy.storchaka
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue40116>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com