Package harold.prog
Harold programming tools.
This package contains a number of subpackages providing different
programming tools:
Most of the functionalities provided by these packages are built-in in
other programming languages, and are considered to help programmers make
better software. However, they are sometimes also considered as annoying
features slowing programmers by forcing them to work a certain way.
The goal of this package is to keep the best of both approaches. All
the functionalities of the packages above are grouped in the HaroldClass
metaclass. This metaclass
performs a number of controls and operations on its instance classes to
provide the intented functionalities, respecting the following
principles:
-
HaroldClass
will never stop the program by raising an
exception, but rather issue a warning whenever a control is not
satisfied
-
HaroldClass
will also issue a warning whenever it
changes the behaviour of its instance classes
Therefore, there are different ways of using harold:
-
people wishing a high level of control can turn the warnings into
exceptions in order to be sure not to miss any;
-
people wishing to prototype rapidly can keep an eye on the warning
but run their program anyway;
-
people not caring about some controls can filter out the
corresponding warnings;
-
finally, people concerned about the performance cost of the
controls can totally disable them by setting
harold.lightweight
; this means that
python library developped with harold can be imported without any
additional cost.
See Also: harold.lightweight
To Do: Decide whether the use of harold.lightweight
should be
replaced by the use of __debug__
.
Classes |
HaroldClass |
A metaclass providing functionnalities of all harold programming
tools. |
HaroldClassWithAutoProperties |
A metaclass providing functionnalities of all harold programming
tools, and automatically adding properties when the class has method
named according to the following pattern: |