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 unit tests for that class which defines the behaviour of your interface. Make sure your class passes all those tests. When you are done, not only does your unit tests specify an interface, you also have a concrete class that implements that interface. Now replace the original class with another class. If that class also passes all your tests, then you can conclude that it also implements the same interface. -- mvh Björn -- http://mail.python.org/mailman/listinfo/python-list