Re: [Zope-dev] Defining Interfaces

2002-01-30 Thread Toby Dickenson
On Mon, 28 Jan 2002 16:37:16 -0700, Jeffrey P Shell [EMAIL PROTECTED] wrote: Many convincing arguments, but somehow I am not persuaded. Or, if you were defining the interface in IDL (mmm, almost-avoiding-redundancy through acronyms!) with the target language being Python, would you include

Re: [Zope-dev] Defining Interfaces

2002-01-30 Thread Jeffrey P Shell
On 1/30/02 4:08 AM, Toby Dickenson [EMAIL PROTECTED] wrote: On Mon, 28 Jan 2002 16:37:16 -0700, Jeffrey P Shell [EMAIL PROTECTED] wrote: Many convincing arguments, but somehow I am not persuaded. Or, if you were defining the interface in IDL (mmm, almost-avoiding-redundancy through

Re: [Zope-dev] Defining Interfaces

2002-01-30 Thread Toby Dickenson
On Wed, 30 Jan 2002 10:08:35 -0700, Jeffrey P Shell [EMAIL PROTECTED] wrote: Or, if you were defining the interface in IDL (mmm, almost-avoiding-redundancy through acronyms!) with the target language being Python, would you include self? But what if you were defining an interface as a

Re: [Zope-dev] Defining Interfaces

2002-01-29 Thread Phillip J. Eby
At 03:17 PM 1/28/02 +, Chris Withers wrote: Jeffrey P Shell wrote: On 1/27/02 11:25 AM, Steve Alexander [EMAIL PROTECTED] wrote: Hi folks, When I define an Interface, are the methods of the interface supposed to have self as the first argument? No. Can you expand on

Re: [Zope-dev] Defining Interfaces

2002-01-29 Thread Florent Guillaume
When I define an Interface, are the methods of the interface supposed to have self as the first argument? No. But this does preclude automatic validation of the contract using python inheritance from the Interface, doesn't it ? Or will there be another way ? Florent -- Florent

Re: [Zope-dev] Defining Interfaces

2002-01-29 Thread Martijn Pieters
On Tue, Jan 29, 2002 at 07:47:46PM +, Florent Guillaume wrote: When I define an Interface, are the methods of the interface supposed to have self as the first argument? No. But this does preclude automatic validation of the contract using python inheritance from the Interface,

Re: [Zope-dev] Defining Interfaces

2002-01-28 Thread Chris Withers
Jeffrey P Shell wrote: On 1/27/02 11:25 AM, Steve Alexander [EMAIL PROTECTED] wrote: Hi folks, When I define an Interface, are the methods of the interface supposed to have self as the first argument? No. Can you expand on this a little? It doesn't make sense to me to exclude

Re: [Zope-dev] Defining Interfaces

2002-01-28 Thread Adrian Hungate
] To: Jeffrey P Shell [EMAIL PROTECTED] Cc: Steve Alexander [EMAIL PROTECTED]; zope-dev [EMAIL PROTECTED] Sent: Monday, January 28, 2002 3:17 PM Subject: Re: [Zope-dev] Defining Interfaces Jeffrey P Shell wrote: On 1/27/02 11:25 AM, Steve Alexander [EMAIL PROTECTED] wrote: Hi folks

Re: [Zope-dev] Defining Interfaces

2002-01-28 Thread Steve Alexander
Adrian Hungate wrote: This is based on the new Python 2.2 stuff, isn't it? I would guess the answer would be You exclude the 'self' first arg in a class method. Not really. You exclude the self first argument of a static method. The first argument of a class method is where the class is

Re: [Zope-dev] Defining Interfaces

2002-01-28 Thread Jeffrey P Shell
On 1/28/02 8:17 AM, Chris Withers [EMAIL PROTECTED] wrote: Jeffrey P Shell wrote: On 1/27/02 11:25 AM, Steve Alexander [EMAIL PROTECTED] wrote: Hi folks, When I define an Interface, are the methods of the interface supposed to have self as the first argument? No. Can you expand

[Zope-dev] Defining Interfaces

2002-01-27 Thread Steve Alexander
Hi folks, When I define an Interface, are the methods of the interface supposed to have self as the first argument? It certainly seems that way from ./lib/python/AccessControl/IUserFolder.py in Zope2. It also seems that way from the Interface Interface. However, many of the interfaces in

Re: [Zope-dev] Defining Interfaces

2002-01-27 Thread Jeffrey P Shell
On 1/27/02 11:25 AM, Steve Alexander [EMAIL PROTECTED] wrote: Hi folks, When I define an Interface, are the methods of the interface supposed to have self as the first argument? No. It certainly seems that way from ./lib/python/AccessControl/IUserFolder.py in Zope2. It also seems that

Re: [Zope-dev] Defining Interfaces

2002-01-27 Thread Steve Alexander
Jeffrey P Shell wrote: On 1/27/02 11:25 AM, Steve Alexander [EMAIL PROTECTED] wrote: Hi folks, When I define an Interface, are the methods of the interface supposed to have self as the first argument? No. In which case, perhaps we should change InterfaceInterface and

Re: [Zope-dev] Defining Interfaces

2002-01-27 Thread Jeffrey P Shell
On 1/27/02 3:09 PM, Steve Alexander [EMAIL PROTECTED] wrote: In which case, perhaps we should change InterfaceInterface and InterfaceBaseInterface from Interface/iclass.py to reflect this. The ZDG should also be updated to reflect this, as the example is wrong.

Re: [Zope-dev] Defining Interfaces

2002-01-27 Thread Chris McDonough
Shall I throw this into the Collector? Probably. I made a comment on the page itself, just a couple of days ago, but it's unknown how often those comments are reviewed: They're not reviewed often by the editors, but they sure help folks who read them in the meantime, so I encourage folks