[issue34427] calling MutableSequence.extend on self produces infinite loop

2018-08-18 Thread Naris R
Change by Naris R : -- keywords: +patch pull_requests: +8291 stage: -> patch review ___ Python tracker <https://bugs.python.org/issue34427> ___ ___ Python-

[issue34427] calling MutableSequence.extend on self produces infinite loop

2018-08-18 Thread Naris R
Change by Naris R : -- nosy: +rhettinger, stutzbach ___ Python tracker <https://bugs.python.org/issue34427> ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue34427] calling MutableSequence.extend on self produces infinite loop

2018-08-18 Thread Naris R
Naris R added the comment: I forgot to copy over __len__ in the example -- ___ Python tracker <https://bugs.python.org/issue34427> ___ ___ Python-bugs-list m

[issue34427] calling MutableSequence.extend on self produces infinite loop

2018-08-18 Thread Naris R
New submission from Naris R : Example: ``` from typing import MutableSequence, TypeVar CliffordGate = TypeVar('CliffordGate') class QCircuit(MutableSequence[CliffordGate]): def __init__(self, gates): self.gates = list(gates) def __repr__(self): return f'{self

[issue33323] inconsistent stack trace for exceptions thrown in generators passed to min/max

2018-04-21 Thread Naris R
Naris R <nariscat...@gmail.com> added the comment: This is a little bit contrived but it demonstrates the problem. ``` def good_exception(): raise Exception('something bad happened') def bad_exception(): return next(iter([])) def good(n): return good_exception() + n def

[issue33323] inconsistent stack trace for exceptions thrown in generators passed to min/max

2018-04-21 Thread Naris R
New submission from Naris R <nariscat...@gmail.com>: if a generator passed to min/max throws an exception, the stack trace is normally shown on the line that caused the exception, but if the exception is a StopIteration, the trace only shows the line where the max/min function was call