Pascal J. Bourguignon wrote:
On the other hand, with the dynamic typing mindset, you might even wrap your values (of whatever numerical type) in a symbolic expression mentionning the unit and perhaps other meta data, so that when the other module receives it, it may notice (dynamically) that two values are not of the same unit, but if compatible, it could (dynamically) convert into the expected unit. Mission saved!
In fairness, you could do this statically too, and without the consing required by the dynamic approach.
-- Scott -- http://mail.python.org/mailman/listinfo/python-list