Questions about subclassing an int

Steven D'Aprano steve at REMOVE-THIS-cybersource.com.au
Fri Jan 4 21:30:41 EST 2008


On Fri, 04 Jan 2008 15:36:27 -0800, Arnaud Delobelle wrote:

> > Now it's no longer a syntax error but I don't see why it's different?
> 
> Same as above, though I don't understand why you get a SyntaxError for T
> and a TypeError for R. AFAICT both shoult give a TypeError.

Probably because it was never a SyntaxError in the first place. If you 
execute the code given for T, it gives a TypeError, just as you would 
expect.

Possibly the Original Poster had mistyped something at some point and got 
a SyntaxError, or more likely he's just using "syntax error" to mean 
"some exception which I haven't actually looked at".


-- 
Steven



More information about the Python-list mailing list