[Python-ideas] Python-ideas Digest, Vol 93, Issue 118

Jean-Charles Douet jean-charles.douet at laposte.net
Wed Aug 20 16:13:38 CEST 2014


Hi All,

Just a few remarks :
- Here is what is said about literate programming : 
http://www.literateprogramming.com/quotes_sd.html. Isn't that Pythonic ?
- PyContracts, annotations, etc… look like « literate programming ». Doc 
is optional, type hint too, why not put the former with the latter ?
- Now about PyContracts: I cannot prevent myself from thinking of it as 
a « CHECK CONSTRAINT » in PostgreSQL and co.
- PyContracts aims at describing constraints, including them in 
docstrings. Thus documentation has to be more structured, more formatted 
and more informative about what's going on in the software being 
interpreted by Python automata. Perhaps structured doc becomes a 
solution to the Rice's theorem ?
- Moreover, the « doctest » module could be very useful too. Whenever 
you write a docstring, you can have a test too; this module could test 
annotations and contracts too. Why not include it in standard library ?
- Two systems of structured documentation :
     - CWEB : http://www-cs-faculty.stanford.edu/~uno/cweb.html
     - FunnelWeb
- Are there collisions with these formats : ReSt, GRASS GIS' « 
boilerplating » in comments, #FIXME and #TODO for the IDEs, etc…

Best regards,
   JCD.


More information about the Python-ideas mailing list