Hi all,
Thanks a lot for your replies!
> Date: Wed, 25 Nov 2015 05:19:57 +1100
> From: st...@pearwood.info
> To: tutor@python.org
> Subject: Re: [Tutor] a class that may not be instantiated
>
> On Tue, Nov 24, 2015 at 03:36:21PM +, Albert-Jan Roskam wrote:
> >
On Tue, Nov 24, 2015 at 03:36:21PM +, Albert-Jan Roskam wrote:
> Hi,
>
> I have two classes with a number of methods that are the same, so I
> want to define a super class that holds these methods.
Sounds like a misuse of classes to me. DRY is not a good reason to make
two otherwise unrelat
On 24 November 2015 at 15:36, Albert-Jan Roskam wrote:
> Hi,
>
> I have two classes with a number of methods that are the same, so I want to
> define a super class that holds these methods. But the super class (below
> called _Generic) should not be instantiated, because it serves no purpose
>
On 24/11/15 15:36, Albert-Jan Roskam wrote:
> I have two classes with a number of methods that are the same,
> so I want to define a super class that holds these methods.
So far so good.
> But the super class (below called _Generic) should not be instantiated,
But here it starts to feel a tad
Albert-Jan Roskam wrote:
> I have two classes with a number of methods that are the same, so I want
to define a super class that holds these methods. But the super class (below
called _Generic) should not be instantiated, because it serves no purpose
other than the DRY principle. I raise a NotI
Hi,
I have two classes with a number of methods that are the same, so I want to
define a super class that holds these methods. But the super class (below
called _Generic) should not be instantiated, because it serves no purpose other
than the DRY principle. I raise a NotImplementedError in case