Exceptions, assigning a tuple
Derek Fountain
nomail at hursley.ibm.com
Fri Nov 21 02:41:30 EST 2003
More information about the Python-list mailing list
Fri Nov 21 02:41:30 EST 2003
- Previous message (by thread): Exceptions, assigning a tuple
- Next message (by thread): Exceptions, assigning a tuple
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> The "exception parameter" is an exception object, which knows how to > behave like a tuple. OK, and what gives it that ability? I tried tuple(f), where f was a file object. It gave me the contents of the file! I tried it again on an instance of one of my own objects and got a "TypeError: iteration over non-sequence" exception. It must be possible to give a class the ability to present itself as a tuple. How is that done?
- Previous message (by thread): Exceptions, assigning a tuple
- Next message (by thread): Exceptions, assigning a tuple
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list