Python Interface Proposal I have been working on a proposal for enhancing the existing interface documentation in Zope. The Wiki for this project can be found here: http://www.zope.org/Wikis/Interfaces/FrontPage An artifact of this project is formal Python/Zope support for "Interfaces". It's a vague word, and I know it means a lot of things to a lot of people, so I am interested in soliciting comments from the Python community. I have enhanced and fixed some bugs in Jim Fulton's 1998 Interfaces "scarecrow" proposal. One of the enhancements is user documentation. This would be a good place for you to start if you are interested in a high level, simple overview: http://www.zope.org/Wikis/Interfaces/InterfaceUserDocumentation The occasional weird formatting is because of the Wiki. This file is also contained in the release if you want something in-hand. If you want some higher fiber details, take a lot at Jim's original proposal document: http://www.zope.org/Wikis/Interfaces/OriginalInterfaceREADME which is also contained in the release. The current version is 0.2.0, and it is still a "scarecrow" piece of software, but it is usable, very interesting, and may stimulate some thoughts, all of which I would like to hear from you. The best way to capture those thoughts is right in the Wiki, which requires membership at Zope.org (which is free). Otherwise, you can send comments to me (michel@digicool.com). You can download the Interface-0.2.0.tgz package from Zope.org at: http://www.zope.org/Members/michel/Products/Interfaces/index_html If you are interested at looking at some of the higher level, Zope oriented goals of this project, take a look at the fishbowl proposal: http://www.zope.org/Wikis/Interfaces/OriginalProposal Thanks! -Michel
On Fri, Nov 24, 2000 at 08:11:48AM -0800, Michel Pelletier wrote:
Python Interface Proposal
I have been working on a proposal for enhancing the existing interface documentation in Zope. The Wiki for this project can be found here:
As far as what's written on the proposal is concerned, I like it. Technically, I have one objection to the interface documentation system: Why must I create a new "dummy" Python file? Why can't the system extract the data from the Python source itself? Duplicating work is never good, and there are even people who like literate programming :-) []s, |alo +---- -- Hack and Roll ( http://www.hackandroll.org ) News for, uh, whatever it is that we are. http://zope.gf.com.br/lalo mailto:lalo@hackandroll.org pgp key: http://zope.gf.com.br/lalo/pessoal/pgp Brazil of Darkness (RPG) --- http://zope.gf.com.br/BroDar
Lalo Martins wrote:
On Fri, Nov 24, 2000 at 08:11:48AM -0800, Michel Pelletier wrote:
Python Interface Proposal
I have been working on a proposal for enhancing the existing interface documentation in Zope. The Wiki for this project can be found here:
As far as what's written on the proposal is concerned, I like it.
Technically, I have one objection to the interface documentation system:
Why must I create a new "dummy" Python file? Why can't the system extract the data from the Python source itself?
You can, of course, because you can just pass the Interface costructor a class. Keep in mind that DC's way of doing interfaces in Zope is one particular policy that you can take or leave irrigardless of how you use the Interface package.
Duplicating work is never good, and there are even people who like literate programming :-)
Yes, for those of you, I salute. Also, if you can, right from the beginning, write your code in one certain way (prose doc strings, private methods begin with _, etc) then by all means, go for it. For trying to ply interfaces onto a system of code like Zope that was never written with, uh, literate programming in mind, it is better, cleaner, and more assertive to describe the interface seperately. Also, defining the interface seperately keep the two things apart, impementation and interface, and doesn't allow you to sneak in a new method unless you also sneak it into the interface, thus making a stronger "contract" with the user. -Michel
Michel Pelletier wrote:
Lalo Martins wrote:
On Fri, Nov 24, 2000 at 08:11:48AM -0800, Michel Pelletier wrote:
Python Interface Proposal
I have been working on a proposal for enhancing the existing interface documentation in Zope. The Wiki for this project can be found here:
As far as what's written on the proposal is concerned, I like it.
Technically, I have one objection to the interface documentation system:
Why must I create a new "dummy" Python file? Why can't the system extract the data from the Python source itself?
You can, of course, because you can just pass the Interface costructor a class.
This is, in my strongly-held opinion, a bad idea. Most classes implement multiple interfaces, and trying to suck interfaces out of a class definition will tend to generate sloppy interfacesl. I added a comment on this to your Wiki page. :) Jim -- Jim Fulton mailto:jim@digicool.com Python Powered! Technical Director (888) 344-4332 http://www.python.org Digital Creations http://www.digicool.com http://www.zope.org
Lalo Martins wrote:
On Fri, Nov 24, 2000 at 08:11:48AM -0800, Michel Pelletier wrote:
Python Interface Proposal
I have been working on a proposal for enhancing the existing interface documentation in Zope. The Wiki for this project can be found here:
As far as what's written on the proposal is concerned, I like it.
Technically, I have one objection to the interface documentation system:
Why must I create a new "dummy" Python file?
I don't think you do need to create a dummy Python file. You *do* need to define interfaces, in whatever files you choose.
Why can't the system extract the data from the Python source itself?
Because the (class) source is about implementation, not interface. A class often implements multiple interfacs, and multiple classes often implement the same interface. For that reason, it makes sense to define interfaces and classes independently.
Duplicating work is never good, and there are even people who like literate programming :-)
There is no duplications. Interfaces and classes are two different kinds of beasts. Jim -- Jim Fulton mailto:jim@digicool.com Python Powered! Technical Director (888) 344-4332 http://www.python.org Digital Creations http://www.digicool.com http://www.zope.org
participants (3)
-
Jim Fulton -
Lalo Martins -
Michel Pelletier