[issue13814] Generators as context managers.

2012-01-18 Thread Arkadiusz Wahlig
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

[issue13328] pdb shows code from wrong module

2011-11-02 Thread Arkadiusz Wahlig
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

[issue13328] pdb shows code from wrong module

2011-11-02 Thread Arkadiusz Wahlig
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

[issue13188] generator.throw() ignores __traceback__ of exception

2011-10-27 Thread Arkadiusz Wahlig
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

[issue13259] __bytes__ not documented

2011-10-24 Thread Arkadiusz Wahlig
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