Re: Interface Implementation in Python

2007-03-06 Thread MonkeeSage
On Mar 6, 6:23 pm, [EMAIL PROTECTED] wrote: > I dont want to expose the above Point3D implementation to the user / > client side.To achieve that we can use interface concept.In Python to > use interface concept. In python you would use name mangling to hide parts of the interface from the public.

Re: Interface Implementation in Python

2007-03-06 Thread p_shakil
On Mar 6, 11:55 am, "Goldfish" <[EMAIL PROTECTED]> wrote: > > > I would like to know the interface concept in Python.How the > > > Interface is defined and implemented in Python?. > > One way I have implemented interfaces, is as follows: > > class MyInterface(object): > def someMethod(self, ar

Re: Interface Implementation in Python

2007-03-06 Thread Goldfish
> > I would like to know the interface concept in Python.How the > > Interface is defined and implemented in Python?. One way I have implemented interfaces, is as follows: class MyInterface(object): def someMethod(self, argument): raise NotImplementedError() If anybody ever uses tha

Re: Interface Implementation in Python

2007-03-06 Thread BJörn Lindqvist
On 5 Mar 2007 16:25:03 -0800, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote: > Hi, > > I would like to know the interface concept in Python.How the > Interface is defined and implemented in Python?. > > How to access the interface fromn Client? You have a class with methods and data. You write many

Re: Interface Implementation in Python

2007-03-06 Thread Larry Bates
[EMAIL PROTECTED] wrote: > Hi, > > I would like to know the interface concept in Python.How the > Interface is defined and implemented in Python?. > > How to access the interface fromn Client? > > Thanks > PSB > You might want to look at how Zope 3 implements interfaces. http://wiki.zope.org/

Re: Interface Implementation in Python

2007-03-06 Thread Johannes Woolard
'Lo, I think I know what you're asking: > I would like to know the interface concept in Python.How the > Interface is defined and implemented in Python?. I assume you're talking about the what Java calls an interface - and the simple answer is that we don't have an equivalent in Python. This is

Re: Interface Implementation in Python

2007-03-05 Thread MonkeeSage
On Mar 5, 6:25 pm, [EMAIL PROTECTED] wrote: > Hi, > > I would like to know the interface concept in Python.How the > Interface is defined and implemented in Python?. > > How to access the interface fromn Client? > > Thanks > PSB Not sure exactly what you mean, but in python (like most dynamic lan