Martin Marcher a écrit : > Hello, > > having worked quite a bit with python in the last months (some Java > before, and some C++ before that) I was very impressed by an idea the > Java people had. > > Explanation: the JSRs define how to implement certain services and or > features in Java so that they can be reused. I haven't found such a > thing for python yet. > (snip) > 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 problem with Java is that it makes it very painfull to bridge two APIs together, while Python usually makes it a breeze (easy delegation, no dumb-ass psycho-rigid type system). So Java's solution (hyper-formalization) isn't necessary here. Now there's something along this line - just much more useful and flexible IMHO - in Zope3 and Twisted. You may want to look at Zope's "Interfaces" for more infos on this, or to read this post by the BDFL: http://www.artima.com/weblogs/viewpost.jsp?thread=155123 HTH -- http://mail.python.org/mailman/listinfo/python-list