I don't have Python 25 on my computer, but since codepad.org is using Python
2.5.1, I did a quick test:
# input
try:
raise Exception("Mrraa!")
except Exception as msg:
print msg
# output
t.py:3: Warning: 'as' will become a reserved keyword in Python 2.6
Line 3
except Exception as msg:
^
SyntaxError: invalid syntax
#########
Well that's interesting. as isn't a keyword yet in Python 2.5.
This works though, and I think it fits the specification in the
documentation.
# input
try:
raise Exception("Mrraa!")
except Exception, msg: # Notice it's a comma
print msg
# output
Mrraa!
##############
Hope that helps,
Xav
--
http://mail.python.org/mailman/listinfo/python-list