What is a type error?

Pascal Bourguignon pjb at informatimago.com
Mon Jul 10 04:45:00 EDT 2006


Chris Smith <cdsmith at twu.net> writes:

> But the point here is that I don't WANT the compiler to be able to infer 
> that, because it's a transient consequence of this year's tax code.  I 
> want the compiler to make sure my code works no matter what the tax code 
> is.  The last thing I need to to go fixing a bunch of bugs during the 
> time between the release of next year's tax code and the released 
> deadline for my tax software.  At the same time, though, maybe I do want 
> the compiler to infer that tax cannot be negative (or maybe it can; I'm 
> not an accountant; I know my tax has never been negative), 

Yes, it can.  For example in Spain.  Theorically, in France IVA can
also come out negative, and you have the right to ask for
reimbursement, but I've never seen a check from French Tax
Administration...

> and that it 
> can't be a complex number (I'm pretty sure about that one).  

I wouldn't bet on it.

For example, French taxes consider "advantages in nature", so your
income has at least two dimensions, Euros and and "advantages in
nature".  Thanksfully, these advantages are converted into Euros, but
you could consider it a product by (complex 0 (- some-factor))...

> I call that 
> encapsulation, and I don't think that it's necessary for lack of 
> anything; but rather because that's how the problem breaks down.

-- 
__Pascal Bourguignon__                     http://www.informatimago.com/
You never feed me.
Perhaps I'll sleep on your face.
That will sure show you.



More information about the Python-list mailing list