On 01/03/2014 12:55 PM, Steven D'Aprano wrote:
André Malo wrote:

* Steven D'Aprano wrote:

Mark Lawrence wrote:

raise "Not Valid DB Type"

is perfectly valid in Python 2.

Actually, no it isn't. It's only valid up to Python 2.4. In Python 2.5,
string exceptions display a warning but continue to work, and in Python
2.6 they generate a compile-time SyntaxError.

Oh? Doesn't look like it.

Oh, it's a runtime TypeError, not SyntaxError.

The main point being that in 2.6 and 2.7 string exceptions do /not/ work.

--
~Ethan~

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to