I think what you want is the traits package from SciPy (from Enthought).
Paper here:
http://python.fyxm.net/pycon/papers/traits.html
Unfortunately, the code has moved, and I don't know where it has gone.
Laura
In a message of Tue, 15 Feb 2005 21:51:34 +0100, Christian Mascher writes:
>I think
On 15-Feb-05, at 12:51 PM, Christian Mascher wrote:
BTW, how does one express units of measure in Python/programming?
Calculations in applications aren't just about numbers. For instance,
how could one express equations like
1 cm^2 == 1 m^2
1000 g == 0.001 t
in a programming language? Anoth
Christian writes -
>
> > def future_value(iday,cday,ivalue,cvalue,years):
> >days_invested=(cday-iday).days
> >year_periods=365/days_invested
>
> Bothered me (too), the year_periods should be of a time-dimension.
>
> duration_in_years=days/365
I would at least argue that there is
> BTW, how does one express units of measure in Python/programming?
> ...
> Another point would be the inclusion of measure of accuracy:
> ...
Don't know about accuracy, but regarding measure units, you may want to
look at Unum:
http://home.tiscali.be/be052320/Unum.html
--
Nicola Larosa - [EMAI
> > def future_value(iday,cday,ivalue,cvalue,years):
> >days_invested=(cday-iday).days
> >year_periods=365/days_invested
>
> Bothered me (too), the year_periods should be of a time-dimension.
>
Wasn't a bug though. I used http://support.microsoft.com/?kbid=123198 to
check Arthur's figur