New submission from Arkadiusz Wahlig arkadiusz.wah...@gmail.com:
Generators should support the with statement with __exit__ calling self.close().
with genfunc() as g:
for item in g:
print(item)
--
messages: 151530
nosy: yak
priority: normal
severity: normal
status: open
New submission from Arkadiusz Wahlig arkadiusz.wah...@gmail.com:
If pdb is used to debug code using zipimport, it may end up displaying source
code from wrong module. Python will execute the correct code but the source
code lines displayed by pdb (including the list command) will come from
Arkadiusz Wahlig arkadiusz.wah...@gmail.com added the comment:
How to reproduce:
Given a module foo.py imported using zipimport with a function bar, if we try
to set a breakpoint in bar using:
break foo.bar
pdb would take filename and lineno from the function object but would use
current
Arkadiusz Wahlig arkadiusz.wah...@gmail.com added the comment:
I don't think this should be applied to 2.7.
In 2.x, the full exception info consists of the (type, value, traceback)-trio.
Programmer is expected to pass this around to retain full exception info.
Re-raising just the value
New submission from Arkadiusz Wahlig arkadiusz.wah...@gmail.com:
It looks like Python 3 supports the __bytes__ magic method (called by
bytes(obj)). However, it's not documented anywhere.
Also, I could not find any reference to BDFL accepting it but it looks like it
got in anyway.
Here