New submission from Márcio Mocellin <[email protected]>:
In Python 3.6.8 (default, Apr 16 2020, 01:36:27) [GCC 8.3.1 20191121 (Red Hat
8.3.1-5)] on linux, when I materialize the list, it is shown and is deleted.
Shouldn't the list persist in memory? Is this a bug or is it really?
```python
>>> vet_neg
['EH01', 'EH02', 'EH03']
Categories (3, object): ['EH01', 'EH02', 'EH03']
>>> cenarios
[0, 1]
>>> vet_neg_cenarios = itertools.product(vet_neg, cenarios, cenarios)
>>> vet_neg_cenarios
<itertools.product object at 0x7f6fa16a65e8>
>>> list(vet_neg_cenarios)
[('EH01', 0, 0), ('EH01', 0, 1), ('EH01', 1, 0), ('EH01', 1, 1), ('EH02', 0,
0), ('EH02', 0, 1), ('EH02', 1, 0), ('EH02', 1, 1), ('EH03', 0, 0), ('EH03', 0,
1), ('EH03', 1, 0), ('EH03', 1, 1)]
>>> list(vet_neg_cenarios)
[]
>>>
```
----------
messages: 388372
nosy: marciomocellin
priority: normal
severity: normal
status: open
title: List amnesia
versions: Python 3.6
_______________________________________
Python tracker <[email protected]>
<https://bugs.python.org/issue43450>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com