2009-06-20 03:59:53 |
Endolith |
description |
You should use docstrings in the unit and constant definitions for each unit, to provide helpful text instead of just leaving it in the source code comments. In IPython, for instance, you can see the (example) docstring very easily:
In [17]: quantities.au?
Type: UnitLength
Base Class: <class 'quantities.unitquantity.UnitLength'>
String Form: 1 au (astronomical_unit)
Namespace: Interactive
File: /usr/local/lib/python2.6/dist-packages/quantities-0.5b2-py2.6.egg/quantities/unitquantity.py
Docstring:
An astronomical unit (abbreviated as AU, au, a.u., or sometimes ua) is a
unit of length roughly equal to the mean distance between the Earth and
the Sun. It is approximately 150 million kilometres (93 million miles).
See http://en.wikipedia.org/wiki/Astronomical_unit |
You should use docstrings in the unit and constant definitions for each unit, to provide helpful text instead of just leaving it in the source code comments. In IPython, for instance, you can see the (example) docstring very easily:
In [17]: quantities.au?
Type: UnitLength
Base Class: <class 'quantities.unitquantity.UnitLength'>
String Form: 1 au (astronomical_unit)
Namespace: Interactive
File: /usr/local/lib/python2.6/dist-packages/quantities-0.5b2-py2.6.egg/quantities/unitquantity.py
Docstring:
An astronomical unit (abbreviated as AU, au, a.u., or sometimes ua) is a
unit of length roughly equal to the mean distance between the Earth and
the Sun. It is approximately 150 million kilometres (93 million miles).
See http://en.wikipedia.org/wiki/Astronomical_unit
|
|