design by contract versus doctest
Yermat
loic at fejoz.net
Tue Apr 6 09:07:30 EDT 2004
Colin Blackburn wrote:
> On Tue, 06 Apr 2004 13:50:02 +0200, Yermat <loic at fejoz.net> wrote:
>
>
>> Hi,
>> Not really each time !
>> As it uses "assert", it is turn off by using -O option of python or
>> by removing the metaclass ! So it work exactly as DBC implemented in
>> Eiffel.
>
>
> It doesn't work exactly as in Eiffel. In Eiffel it is *part* of the
> language. Some aspects of DbC can be implemented in other languages but
> not all (invariants for instance are not straightforward.)
>
>> His author is Bertrand Meyer (with an 'e').
>> So please re-read it again !
>
>
> I am so sorry that I typed his name incorrectly. Please don't make me
> read all 1000 pages again!!
>
> Colin
> --
I forgot to say that the invariant can be checked each time a function
is called or ended...
Yermat
More information about the Python-list
mailing list