New submission from Claudiu Saftoiu:
I'm processing Yahoo! Groups backup archives, and came across an email message
which causes the `.get_payload(decode=True)` step to raise an AssertionError.
Particularly, the following exception is raised in
`lib/python3.5/email/_encoded_words.py`,
Claudiu Saftoiu added the comment:
See attached another file with more test cases.
--
Added file: http://bugs.python.org/file43557/bugreport_moretests.py
___
Python tracker
<http://bugs.python.org/issue27
New submission from Claudiu Saftoiu:
When debugging code that raises unexpected exceptions, I often find myself
doing this:
try:
some_code
except:
import code; code.interact(local=locals())
raise
My suggestion is a context manager to make this less verbose
New submission from Claudiu Saftoiu:
Right now, itertools.permutations and itertools.combinations and
itertools.product objects don't have a `len`.
>>> len(itertools.combinations(range(10), 5))
Traceback (most recent call last):
File "", line 1, in
T
Claudiu Saftoiu added the comment:
Ahh, I see. In that case, if the object passed-in has a length, use that. If
not, then raise TypeError. e.g. proposed behavior:
>>> len(itertool.combinations(range(10), 2))
45
>>> len(itertool.combinations(iter(range(10)),