About some problem

Steven D'Aprano steve+comp.lang.python at pearwood.info
Fri Jan 3 15:55:24 EST 2014


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. I learn something new
everyday, thanks for the correction.



-- 
Steven




More information about the Python-list mailing list