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 inter

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-redundanc

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-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

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 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? > > >

Re: [Zope-dev] Defining Interfaces

2002-01-29 Thread Chris Withers
Steve and Jeff, Thanks for the great explanations :-) Now I'm curious about Python 2.2 and classes with static methods... cheers, Chris Jeffrey P Shell wrote: > > On 1/28/02 8:17 AM, "Chris Withers" <[EMAIL PROTECTED]> wrote: > > > Jeffrey P Shell wrote: > >> > >> On 1/27/02 11:25 AM, "Stev

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 argumen

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 Adrian Hungate
: "Chris Withers" <[EMAIL PROTECTED]> 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

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 t

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 fol

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. > > http://www.zope.

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 an

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