[Numpy-discussion] abstraction and interfaces
Wed Oct 17 02:59:22 CDT 2007
What is more, with the concept of duck-typing, you just have to provide the
interface without inheriting from a mother class (which is what I do for the
optimizer framework, the other sub-modules do not derive from a common
2007/10/17, Renato Serodio <firstname.lastname@example.org>:
> Hello there,
> thanks to your pointer, I've progressed further on the OO concept, and
> am currently building analysis, inputData and outputResults interfaces
> that should add some flexibility to my program.
> On the other hand, pulling the OO and interfaces string opened a box
> full of little critters, and now I'm learning about UML, some advanced
> class usage and so on. My brain hurts..
> On 12/10/2007, Alan G Isaac <email@example.com> wrote:
> > On Fri, 12 Oct 2007, Renato Serodio apparently wrote:
> > > The scripts that produce these metrics use Scipy/Numpy
> > > functions that operate on data conveniently converted to
> > > numpy arrays. They're quite specific, and I tend to
> > > produce/tweak a lot of them. So, to fit in this
> > > application someone suggested I programmed 'interfaces'
> > > (in java jargon) to them - that way I could develop the
> > > whole wrapper application without giving much thought to
> > > the actual number-crunching bits.
> > That sounds quite right. Check out
> > <URL:
> > <URL:http://svn.scipy.org/svn/scipy/trunk/scipy/stats/models/>
> > for examples that may be relevant to your project.
> > Python does not have interfaces per se, but that does
> > not stop you from designing interface-like classes and
> > inheriting from them.
> > fwiw,
> > Alan Isaac
> > _______________________________________________
> > Numpy-discussion mailing list
> > Numpyfirstname.lastname@example.org
> > http://projects.scipy.org/mailman/listinfo/numpy-discussion
> Numpy-discussion mailing list
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Numpy-discussion