On 05/21/2013 10:36 AM, Serhiy Storchaka wrote:
21.05.13 10:17, Hrvoje Niksic написав(ла):
On 05/20/2013 05:15 PM, Ethan Furman wrote:
1) Do nothing and be happy I use 'raise ... from None' in my own
libraries
2) Change the wording of 'During handling of the above exception,
another exceptio
On 29/05/13 04:00, Antoine Pitrou wrote:
On Tue, 28 May 2013 16:02:00 +0300
Serhiy Storchaka wrote:
20.05.13 18:46, Antoine Pitrou написав(ла):
I think it is a legitimate case where to silence the original
exception. However, the binascii.Error would be more informative if it
said *which* non-
On Tue, 28 May 2013 16:02:00 +0300
Serhiy Storchaka wrote:
> 20.05.13 18:46, Antoine Pitrou написав(ла):
> > I think it is a legitimate case where to silence the original
> > exception. However, the binascii.Error would be more informative if it
> > said *which* non-base32 digit was encountered.
>
On 5/28/2013 6:02 AM, Serhiy Storchaka wrote:
20.05.13 18:46, Antoine Pitrou написав(ла):
I think it is a legitimate case where to silence the original
exception. However, the binascii.Error would be more informative if it
said *which* non-base32 digit was encountered.
Please open a new issue
20.05.13 18:46, Antoine Pitrou написав(ла):
I think it is a legitimate case where to silence the original
exception. However, the binascii.Error would be more informative if it
said *which* non-base32 digit was encountered.
Please open a new issue for this request (note that no other binascii o
On 24/05/13 00:24, Ethan Furman wrote:
Here's the code that existed at one point:
for c in s:
val = _b32rev.get(c)
if val is None:
raise TypeError('Non-base32 digit found')
Even though there is no KeyError to convert in this incarnation, providing the
cause
On 05/23/2013 04:36 AM, "Martin v. Löwis" wrote:
Am 21.05.13 18:03, schrieb Ethan Furman:
And, of course, we only make these changes when we're already modifying
the module for some other reason.
In the specific case, the KeyError has indeed useful information that
the TypeError does not, name
Am 21.05.13 18:03, schrieb Ethan Furman:
> And, of course, we only make these changes when we're already modifying
> the module for some other reason.
In the specific case, the KeyError has indeed useful information that
the TypeError does not, namely the specific character that is the culprit.
S
On 05/21/2013 04:23 AM, Nick Coghlan wrote:
On Tue, May 21, 2013 at 5:17 PM, Hrvoje Niksic wrote:
On 05/20/2013 05:15 PM, Ethan Furman wrote:
1) Do nothing and be happy I use 'raise ... from None' in my own
libraries
2) Change the wording of 'During handling of the above exception, another
On Tue, 21 May 2013 01:39:03 +1000, Steven D'Aprano wrote:
> On 21/05/13 00:12, Ethan Furman wrote:
>
> > As a case in point, base64.py is currently getting a bug fix, and also
> > contains this code:
> >
> > def b32decode(s, casefold=False, map01=None):
> > .
> > .
> > .
> >
On Tue, May 21, 2013 at 11:23 PM, Hrvoje Niksic wrote:
> In my example code the "raise" keyword appears lexically inside the "except"
> clause. The compiler would automatically emit a different raise opcode in
> that case.
Hrvoje, can we drop this subthread please. The topic was addressed way
ba
On 05/21/2013 02:57 PM, Serhiy Storchaka wrote:
21.05.13 13:05, Hrvoje Niksic написав(ла):
On 05/21/2013 11:56 AM, Serhiy Storchaka wrote:
try:
x = d['key']
except KeyError:
x = fallback('key')
def fallback(key):
if key not in a:
raise BusinessError(...)
retur
21.05.13 13:05, Hrvoje Niksic написав(ла):
On 05/21/2013 11:56 AM, Serhiy Storchaka wrote:
try:
x = d['key']
except KeyError:
x = fallback('key')
def fallback(key):
if key not in a:
raise BusinessError(...)
return 1 / a[key] # possible TypeError, ZeroDivisionEr
On Tue, May 21, 2013 at 5:17 PM, Hrvoje Niksic wrote:
> On 05/20/2013 05:15 PM, Ethan Furman wrote:
>>
>> 1) Do nothing and be happy I use 'raise ... from None' in my own
>> libraries
>>
>> 2) Change the wording of 'During handling of the above exception, another
>> exception occurred' (no ideas
On 05/21/2013 11:56 AM, Serhiy Storchaka wrote:
try:
x = d['key']
except KeyError:
x = fallback('key')
def fallback(key):
if key not in a:
raise BusinessError(...)
return 1 / a[key] # possible TypeError, ZeroDivisionError, etc
Yes, in that case the exception w
21.05.13 12:28, Hrvoje Niksic написав(ла):
On 05/21/2013 10:36 AM, Serhiy Storchaka wrote:
The above exception was converted to the following exception:
...
That makes it clear that the conversion was explicit and (hopefully)
intentional, and that the latter exception supersedes the f
On 05/21/2013 10:36 AM, Serhiy Storchaka wrote:
The above exception was converted to the following exception:
...
That makes it clear that the conversion was explicit and (hopefully)
intentional, and that the latter exception supersedes the former.
How do you distinguish intentional
21.05.13 10:17, Hrvoje Niksic написав(ла):
On 05/20/2013 05:15 PM, Ethan Furman wrote:
1) Do nothing and be happy I use 'raise ... from None' in my own
libraries
2) Change the wording of 'During handling of the above exception,
another exception occurred' (no ideas as to what at
the moment)
On 05/20/2013 05:15 PM, Ethan Furman wrote:
1) Do nothing and be happy I use 'raise ... from None' in my own libraries
2) Change the wording of 'During handling of the above exception, another
exception occurred' (no ideas as to what at
the moment)
The word "occurred" misleads one to think
On 21 May 2013 05:01, "Ethan Furman" wrote:
>
> On 05/20/2013 11:32 AM, Terry Jan Reedy wrote:
>>
>> On 5/20/2013 11:39 AM, Steven D'Aprano wrote:
>>>
>>> On 21/05/13 00:12, Ethan Furman wrote:
>>>
>>>
As a case in point, base64.py is currently getting a bug fix, and also
contains this c
On May 20, 2013, at 11:46 AM, Antoine Pitrou wrote:
> On Mon, 20 May 2013 07:12:07 -0700
> Ethan Furman wrote:
>>
>> As a case in point, base64.py is currently getting a bug fix, and also
>> contains this code:
>>
>> def b32decode(s, casefold=False, map01=None):
>> .
>> .
>> .
>
On 05/20/2013 11:32 AM, Terry Jan Reedy wrote:
On 5/20/2013 11:39 AM, Steven D'Aprano wrote:
On 21/05/13 00:12, Ethan Furman wrote:
As a case in point, base64.py is currently getting a bug fix, and also
contains this code:
def b32decode(s, casefold=False, map01=None):
.
.
.
On 5/20/2013 11:39 AM, Steven D'Aprano wrote:
On 21/05/13 00:12, Ethan Furman wrote:
As a case in point, base64.py is currently getting a bug fix, and also
contains this code:
def b32decode(s, casefold=False, map01=None):
.
.
.
for i in range(0, len(s), 8):
quanta
20.05.13 16:12, Ethan Furman написав(ла):
As a quick reminder, PEP 409 allows this:
try:
...
except AnError:
raise SomeOtherError from None
so that if the exception is not caught, we get the traditional single
exception traceback, instead of the new:
During han
Am 20.05.2013 17:39, schrieb Steven D'Aprano:
> On 21/05/13 00:12, Ethan Furman wrote:
>
>
>> As a case in point, base64.py is currently getting a bug fix, and also
>> contains this code:
>>
>> def b32decode(s, casefold=False, map01=None): . . . for i in range(0,
>> len(s), 8): quanta = s[i: i +
On Mon, 20 May 2013 07:12:07 -0700
Ethan Furman wrote:
>
> As a case in point, base64.py is currently getting a bug fix, and also
> contains this code:
>
> def b32decode(s, casefold=False, map01=None):
> .
> .
> .
> for i in range(0, len(s), 8):
> quanta = s[i: i +
On 21/05/13 00:12, Ethan Furman wrote:
As a case in point, base64.py is currently getting a bug fix, and also contains
this code:
def b32decode(s, casefold=False, map01=None):
.
.
.
for i in range(0, len(s), 8):
quanta = s[i: i + 8]
acc = 0
try:
On 05/20/2013 07:50 AM, R. David Murray wrote:
On Mon, 20 May 2013 07:12:07 -0700, Ethan Furman wrote:
As a case in point, base64.py is currently getting a bug fix, and also
contains this code:
def b32decode(s, casefold=False, map01=None):
.
.
.
for i in range(0, len(s),
On Mon, 20 May 2013 07:12:07 -0700, Ethan Furman wrote:
> As a case in point, base64.py is currently getting a bug fix, and also
> contains this code:
>
> def b32decode(s, casefold=False, map01=None):
> .
> .
> .
> for i in range(0, len(s), 8):
> quanta = s[i: i + 8]
On 05/20/2013 06:47 AM, Nick Coghlan wrote:
On 20 May 2013 23:38, Ethan Furman wrote:
As a quick reminder, PEP 409 allows this:
try:
...
except AnError:
raise SomeOtherError from None
so that if the exception is not caught, we get the traditional single exception
trac
On Mon, 20 May 2013 06:12:41 -0700, Ethan Furman wrote:
> As a quick reminder, PEP 409 allows this:
>
> try:
> ...
> except AnError:
> raise SomeOtherError from None
>
> so that if the exception is not caught, we get the traditional single
> exception traceback, inst
On 20 May 2013 23:38, "Ethan Furman" wrote:
>
> As a quick reminder, PEP 409 allows this:
>
> try:
> ...
> except AnError:
> raise SomeOtherError from None
>
> so that if the exception is not caught, we get the traditional single
exception traceback, instead of the new:
>
>
As a quick reminder, PEP 409 allows this:
try:
...
except AnError:
raise SomeOtherError from None
so that if the exception is not caught, we get the traditional single exception
traceback, instead of the new:
During handling of the above exception, another exception
33 matches
Mail list logo