On Thu, 30 Aug 2007 07:10:47 +0200, Martin Marcher wrote: > My idea was to define "Python Implementation Guidelines" (PIGs) that > specify a problem formalize it enough so that implementations are > interchangeable (in this example create a module that has an > "authenticate(username, password)" method so that one could easily take > that module for any given app and then authenticate against postgres, > and also against my plaintext file (which was the original - quite > useless - implementation). > > Does that sound like a good idea or would that be over formalization?
The Python community already did something for web applications (WSGI, I think). Not sure how well that's working out. Doing this kind of thing is not, of course, something that can be done in general for all problems. It would only help if there's enough demand for interoperability that developers make the effort to adhere to the guidelines (which are rarely ideal for any particular situation). Although there are some informal standards that Python programmers often observe (for example, the interface of file-like objects), there isn't too much demand to standardize them. I believe the Python language itself makes formal guidelines less helpful, because its dynamicism (among other things) makes is so good at interfacing. That is, if you have two pieces of code that don't work together, it's easy to connect them. Many people often call Python a good "glue" language for this reason. And when you have a good "glue" language, formal interface guidelines aren't so important. Carl Banks -- http://mail.python.org/mailman/listinfo/python-list