New submission from Arkadiusz Wahlig :
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 are some posts back from
Arkadiusz Wahlig 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 (exception instance)
New submission from Arkadiusz Wahlig :
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 an
unrela
Arkadiusz Wahlig 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 frame to get mod
New submission from Arkadiusz Wahlig :
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
title: Generators as context