Message386841
Still happening in 3.10:
Python 3.10.0a5+ (heads/master:bf2e7e55d7, Feb 11 2021, 23:09:25) [MSC v.1928 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import gc
>>> TAG = object()
>>>
>>> def monitor():
... lst = [x for x in gc.get_referrers(TAG)
... if isinstance(x, tuple)]
... t = lst[0] # this *is* the result tuple
... print(t) # full of nulls !
... return t # Keep it alive for some time
...
>>> def my_iter():
... yield TAG # 'tag' gets stored in the result tuple
... t = monitor()
... for x in range(10):
... yield x # SystemError when the tuple needs to be resized
...
>>> tuple(my_iter())
(<object object at 0x00000217225091B0>, <NULL>, <NULL>, <NULL>, <NULL>, <NULL>, <NULL>, <NULL>, <NULL>, <NULL>)
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
SystemError: C:\Users\User\src\cpython-dev\Objects\tupleobject.c:963: bad argument to internal function
>>> |
|
Date |
User |
Action |
Args |
2021-02-11 23:12:45 | iritkatriel | set | recipients:
+ iritkatriel, arigo, jcea, ghaering, amaury.forgeotdarc, pitrou, lkraav, pxd |
2021-02-11 23:12:45 | iritkatriel | set | messageid: <1613085165.77.0.320536668071.issue15108@roundup.psfhosted.org> |
2021-02-11 23:12:45 | iritkatriel | link | issue15108 messages |
2021-02-11 23:12:45 | iritkatriel | create | |
|