whats this mean?

Alex new_name at mit.edu
Fri Jul 20 23:45:55 EDT 2001

See http://www.python.org/doc/ref/try.html#l2h-439 for the syntax of
try/except.  "except socket.error, why" assigns the value raised with
the exception to the name "why".  Play with this a bit:

>>> try: raise SyntaxError('example')
... except SyntaxError, why: print why


More information about the Python-list mailing list