Re: Constraints -//- first release -//- Flexible abstract class based validation for attributes, functions and code blocks

2012-01-27 Thread Jon Clements
On Jan 27, 6:38 am, Nathan Rice wrote: > > May I suggest a look at languages such as ATS and Epigram? They use > > types that constrain values specifically to prove things about your > > program. Haskell is a step, but as far as proving goes, it's less > > powerful than it could be. ATS allows you

Re: Constraints -//- first release -//- Flexible abstract class based validation for attributes, functions and code blocks

2012-01-26 Thread Nathan Rice
> May I suggest a look at languages such as ATS and Epigram? They use > types that constrain values specifically to prove things about your > program. Haskell is a step, but as far as proving goes, it's less > powerful than it could be. ATS allows you to, at compile-time, declare > that isinstance(

Re: Constraints -//- first release -//- Flexible abstract class based validation for attributes, functions and code blocks

2012-01-26 Thread Devin Jeanpierre
On Thu, Jan 26, 2012 at 3:24 PM, Nathan Rice wrote: > One of the nice things about Haskell is that the language is designed > in a way that is conducive to > proving things about your code.  A side benefit of being able to prove > things about your code is that > in some cases you will be able to

Re: Constraints -//- first release -//- Flexible abstract class based validation for attributes, functions and code blocks

2012-01-26 Thread Nathan Rice
On Thu, Jan 26, 2012 at 2:51 PM, Devin Jeanpierre wrote: > Ooh, runtime turing-complete dependent-types. :) > > I'm not sure if you're aware of the literature on this sort of thing. > It's nice reading. A library such as this that's designed for it could > be used for static checks as well. Actua

Re: Constraints -//- first release -//- Flexible abstract class based validation for attributes, functions and code blocks

2012-01-26 Thread Devin Jeanpierre
Ooh, runtime turing-complete dependent-types. :) I'm not sure if you're aware of the literature on this sort of thing. It's nice reading. A library such as this that's designed for it could be used for static checks as well. Probably deserves a better name than "constraintslib", that makes one th

Constraints -//- first release -//- Flexible abstract class based validation for attributes, functions and code blocks

2012-01-26 Thread Nathan Rice
PyPi name: constraintslib (you'll be dissapointed if you get constraints by accident) Docs: http://packages.python.org/constraintslib/ Github: https://github.com/nathan-rice/Constraints >From the docs: Constraints - Sleek contract-style validation tools =

Re: Does Abstract class , interfaces there in python ?

2010-04-13 Thread Chris Rebert
On Tue, Apr 13, 2010 at 10:57 PM, gopi krishna wrote: > Hi , >  I want to know whether there is an abstract class and interfaces in python. Sort of: http://docs.python.org/library/abc.html Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list

Does Abstract class , interfaces there in python ?

2010-04-13 Thread gopi krishna
Hi , I want to know whether there is an abstract class and interfaces in python. If so how to implement it.. Pls help me on this. Thanks Gopi -- http://mail.python.org/mailman/listinfo/python-list

Re: Abstract class

2008-09-14 Thread Stephen Horne
On Sun, 14 Sep 2008 18:03:23 +0200, Mr.SpOOn <[EMAIL PROTECTED]> wrote: >I have to manage many elements of music such as notes, intervals, >scales, chords and so on. All these elements share properties and >behavior, so what I want to do is an abstract class "Note" a

Re: Abstract Methods & Abstract Class

2005-10-21 Thread Terry Hancock
On Thursday 20 October 2005 03:32 am, Gerald Klix wrote: > class AbstractBase: > def method(self): > raise NotImplementedError( "abstract method called" ) You should also consider using an "interface" instead of an abstract class -- they can serve much t

Re: Abstract Methods & Abstract Class

2005-10-20 Thread sébastien
or [...] def method(self): assert not "must be overrided" -- http://mail.python.org/mailman/listinfo/python-list

Re: Abstract Methods & Abstract Class

2005-10-20 Thread Gerald Klix
CTED]> Cc: Sent: Thursday, October 20, 2005 8:56 AM Subject: Re: Abstract Methods & Abstract Class > On Thu, Oct 20, 2005 at 12:05:05PM +0530, Iyer, Prasad C wrote: > > > > Do we have something like abstract methods & Abstract class. > > > > So that my

Re: Abstract Methods & Abstract Class

2005-10-20 Thread Fredrik Lundh
Andreas Kostyrka wrote: > > Do we have something like abstract methods & Abstract class. > > > > So that my class would just define the method. And the implementation > > would be defined by somebody else. > > class AbstractBase: > def method(self): >

Re: Abstract Methods & Abstract Class

2005-10-19 Thread Andreas Kostyrka
On Thu, Oct 20, 2005 at 12:05:05PM +0530, Iyer, Prasad C wrote: > > Do we have something like abstract methods & Abstract class. > > So that my class would just define the method. And the implementation > would be defined by somebody else. class AbstractBase: def method(s

Abstract Methods & Abstract Class

2005-10-19 Thread Iyer, Prasad C
Do we have something like abstract methods & Abstract class. So that my class would just define the method. And the implementation would be defined by somebody else. This message contains information that may be privileged or confidential and is the property of the Capgemini Group. I