Re: [Python-Dev] Exceptions in LOAD_GLOBAL and LOAD_NAME

2012-02-23 Thread Mark Shannon
Nick Coghlan wrote: On Thu, Feb 23, 2012 at 8:12 PM, Mark Shannon wrote: Should exceptions raised in the equality test be converted to a NameError or just propogated? Our general trend has been towards letting such exceptions escape the operation that caused them rather than implicitly suppre

Re: [Python-Dev] Exceptions in LOAD_GLOBAL and LOAD_NAME

2012-02-23 Thread Nick Coghlan
On Thu, Feb 23, 2012 at 8:12 PM, Mark Shannon wrote: > Should exceptions raised in the equality test be converted to a NameError or > just propogated? Our general trend has been towards letting such exceptions escape the operation that caused them rather than implicitly suppressing them. In this

[Python-Dev] Exceptions in LOAD_GLOBAL and LOAD_NAME

2012-02-23 Thread Mark Shannon
The code below causes different behaviour for LOAD_GLOBAL and LOAD_NAME. Which is correct? Should exceptions raised in the equality test be converted to a NameError or just propogated? Cheers, Mark. - import sys class S(str): pass def eq_except(self, o