Take a look at the archives of this list -- there was a large conversation about DBC a while back (a year, two years ??? )
I think if you really want to support DBC, there will need to be more changes than this -- though there are libraries that support it with current Python.
Also, let's be clear about hte language re use -- when you say:
there should be lots of assertions, do you mean the english were assertion, or the Python keyword assert?
If the former, than you are free, or course, to use a ordinary if and raise to make all sort sof assertions about the code at runtime.
To me -- the entire point of the assert statement is that it is for testing, and can be turned off. If you want to check a condition always, just use an if and a raise:
How is this:
if value < 0:
raise ValueError("this only works with positive numbers")
Any more difficult to read or write than:
assert value >= 0, raise ValueError("this only works with positive numbers")
-CHB