Thank you very much for reminding me. I have been sloppy.
It should have said static type checking.
ciao
Skip Montanaro wrote:
> >> Eiffel (language) has both type checking and design by contract.
> >> Python lacks both.
>
> Actually, Python is strongly typed. It's just dynamically instead o
Thank you very much. It is really a very elegant piece of code :-)
Eiffel (language) has both type checking and design by contract.
Python lacks both.
Your module tackles type checking, I
tried to execute arbitrary code before
and after function execution to realize
runtime assertions.
I wonder i
# Google-News won't let be post a follow-up right now!
# Google-Beta-News destroys the formatting :-(
# So I'll start a new thread.
Hi Stephen
I have not read anything about the
"framehack lambda replacement" yet,
but I do compile the pre- and
postconditions. Syntax erros e.g.
will be raised if th
Hi Stephen
I have not read anything about the
"framehack lambda replacement" yet,
but I do compile the pre- and
postconditions. Syntax erros e.g.
will be raised if the module
is compiled. Although I must admit
that your code snippets look more like
compiled code ;-)
Hi Robert
thanks for the link t
My humble attempt to model pre/postconditions with
decorators :-) It's also my first experiment
with decorators.
If you have any ideas or thoughts on how to
improve the code snippet, I'll be happy to
learn more.
Enjoy :-)
def condition(pretext,posttext=""):
precode=compile(pretex