output formatting for user-defined types

Russ uymqlp502 at sneakemail.com
Sat Apr 8 00:39:24 EDT 2006


Let me just revise earlier my reply slightly.

>But in any case, I suspect you do automatically convert units. What do you
>do in this case:

Yes, I do automatically convert units, but I only do correct
conversions. Conversion from any unit other than radian to a
dimensionless float is incorrect, so I don't do it automatically.

>x = 45*ft
>y = 16*m
>z = x+y

>Do you raise an error?

I said in the previous reply that this works fine. Actually, I don't
think that is true with the current version, but that is only because I
did not include a meter/feet conversion in the two sample configuration
files that are provided. It is trivial matter of two lines.




More information about the Python-list mailing list