> Roadblocks
> During the development, the following roadblocks were encountered:
> 
> * We wanted to include the contracts in the output of help(). Unfortunately, 
> help() renders the __doc__ of the class and not of the instance. For 
> functions, this is the class "function" which you can not inherit from. See 
> [5] for more details.
> 
> * We need to inspect the source code of the condition and error lambdas to 
> generate the violation message and infer the error type in the documentation, 
> respectively. inspect.getsource(.) is broken on lambdas defined in decorators 
> in Python 3.5.2+ (see [6]). 


Both these things seem like we should look at separately! I know I'm always 
annoyed that repr(lambda x: x*2) != "lambda x: x*2" for some reason. Fixing 
these two things in python seems like obvious wins to me, especially the latter.

/ Anders
_______________________________________________
Python-ideas mailing list
Python-ideas@python.org
https://mail.python.org/mailman/listinfo/python-ideas
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to