robertj wrote:
> hi,
>
> before i begin a word of warning:
> if you, after reading this post, feel the almost unbearable urge
> to answer me; if you feel that my poor soul must be saved
> from the evil soothing of static typedness; if you think i must
> be enlightened to the wonderful world of dynamic typing...
> PLEASE resist it!
> make some breathing exercises or take a cold shower.
> really i dont want to discuss the merrits of static vs. dymanic
> typing.
>
>
> ok here is my question:
> is there any lib where i could emulate attributes on methods
> like there are some libs already now for python 2.4
>
> @params(String, String)
> @return(String)
> def concat(_key1, _key2):
>     return _key1 + _key2
>
> that is something that allows for defining the parameters
> and the return type and the corresponding checks at runtime.
>
> i thought i have seen something like that for ruby sometime and
> somewhere but i can not find it anymore (or maybe i had simply
> visions)
>
> thank you
>
> robertj

There is a DbC sample implementation that might be able to do what you
want.

    robert