Re: [Python-Dev] Exceptions and slicing

2006-10-12 Thread Thomas Heller
Thomas Heller schrieb: Martin v. Löwis schrieb: Thomas Heller schrieb: 1. The __str__ of a WindowsError instance hides the 'real' windows error number. So, in 2.4 print error_instance would print for example: [Errno 1002] Das Fenster kann die gesendete Nachricht nicht verarbeiten.

[Python-Dev] Exceptions and slicing

2006-09-20 Thread Thomas Heller
Is it an oversight that exception instances do no longer support slicing in Python 2.5? This code works in 2.4, but no longer in 2.5: try: open(, r) except IOError, details: print details[:] Thomas ___ Python-Dev mailing list

Re: [Python-Dev] Exceptions and slicing

2006-09-20 Thread Brett Cannon
On 9/20/06, Thomas Heller [EMAIL PROTECTED] wrote: Is it an oversight that exception instances do no longer supportslicing in Python 2.5?This code works in 2.4, but no longer in 2.5:try:open(, r)except IOError, details: print details[:]Technically, yes. There is no entry in the sq_slice field for

Re: [Python-Dev] Exceptions and slicing

2006-09-20 Thread Thomas Heller
Brett Cannon schrieb: On 9/20/06, Thomas Heller [EMAIL PROTECTED] wrote: Is it an oversight that exception instances do no longer support slicing in Python 2.5? This code works in 2.4, but no longer in 2.5: try: open(, r) except IOError, details: print details[:]

Re: [Python-Dev] Exceptions and slicing

2006-09-20 Thread Martin v. Löwis
Thomas Heller schrieb: 1. The __str__ of a WindowsError instance hides the 'real' windows error number. So, in 2.4 print error_instance would print for example: [Errno 1002] Das Fenster kann die gesendete Nachricht nicht verarbeiten. while in 2.5: [Error 22] Das Fenster kann

Re: [Python-Dev] Exceptions and slicing

2006-09-20 Thread Brett Cannon
On 9/20/06, Thomas Heller [EMAIL PROTECTED] wrote: Brett Cannon schrieb: On 9/20/06, Thomas Heller [EMAIL PROTECTED] wrote: Is it an oversight that exception instances do no longer support slicing in Python 2.5? This code works in 2.4, but no longer in 2.5: try: open(, r) except IOError, details:

Re: [Python-Dev] Exceptions and slicing

2006-09-20 Thread Thomas Heller
Martin v. Löwis schrieb: Thomas Heller schrieb: 1. The __str__ of a WindowsError instance hides the 'real' windows error number. So, in 2.4 print error_instance would print for example: [Errno 1002] Das Fenster kann die gesendete Nachricht nicht verarbeiten. while in 2.5: