Terry Reedy wrote:
On 7/31/2012 4:49 PM, Chris Kaynor wrote:
On Tue, Jul 31, 2012 at 1:21 PM, Terry Reedy wrote:
Another example: KeyError and IndexError are both subscript errors,
but there is no SubscriptError superclass, even though both work
thru the same mechanism -- __getitem__. The
On 8/1/2012 11:53 AM, Ethan Furman wrote:
Terry Reedy wrote:
On 7/31/2012 4:49 PM, Chris Kaynor wrote:
On Tue, Jul 31, 2012 at 1:21 PM, Terry Reedy wrote:
one wants to catch both errors, one can easily enough. To continue
the example above, popping an empty list and empty set produce
Hi!
Using Python 2.7, I stumbled across the fact that 'self.xy' raises an
AttributeError if self doesn't have an 'xy' as attribute, but 'xy' will
instead raise a NameError. To some extent, these two are very similar,
namely that the name 'xy' couldn't be resolved in a certain context, but
On 7/31/2012 6:36 AM, Ulrich Eckhardt wrote:
Hi!
Using Python 2.7, I stumbled across the fact that 'self.xy' raises an
AttributeError if self doesn't have an 'xy' as attribute, but 'xy' will
instead raise a NameError. To some extent, these two are very similar,
namely that the name 'xy'
On Tue, Jul 31, 2012 at 1:21 PM, Terry Reedy tjre...@udel.edu wrote:
Another example: KeyError and IndexError are both subscript errors, but
there is no SubscriptError superclass, even though both work thru the same
mechanism -- __getitem__. The reason is that there is no need for one. In
On 7/31/2012 4:49 PM, Chris Kaynor wrote:
On Tue, Jul 31, 2012 at 1:21 PM, Terry Reedy tjre...@udel.edu
mailto:tjre...@udel.edu wrote:
Another example: KeyError and IndexError are both subscript errors,
but there is no SubscriptError superclass, even though both work
thru the same