> On Feb 24, 2017, at 1:24 AM, Steve D'Aprano
> wrote:
>
> On Fri, 24 Feb 2017 11:19 am, Irv Kalb wrote:
>
>> Hi,
>>
>> I have built a set of three classes:
>>
>> - A super class, let's call it: Base
> [...]
>> I would like to add is some "insurance" that I (or someone else who uses
>> my c
On Sat, 25 Feb 2017 05:40 am, MRAB wrote:
>> class Base:
>> def __init__(self):
>> if type(self) is Base:
>> raise TypeError("cannot instantiate Base class")
>>
>>
>> Does that help?
>>
> D'oh! Never thought of that! :-)
>
> The OP is using Python 2.7, so you'll need to us
On 2017-02-24 09:24, Steve D'Aprano wrote:
On Fri, 24 Feb 2017 11:19 am, Irv Kalb wrote:
Hi,
I have built a set of three classes:
- A super class, let's call it: Base
[...]
I would like to add is some "insurance" that I (or someone else who uses
my code) never instantiates my Base class,
On 24.02.2017 01:19, Irv Kalb wrote:
Hi,
I have built a set of three classes:
- A super class, let's call it: Base
- A class that inherits from Base, let's call that: ClassA
- Another class that inherits from Base, let's call that: ClassB
ClassA and ClassB have some code in their __init__ m
On Fri, 24 Feb 2017 11:19 am, Irv Kalb wrote:
> Hi,
>
> I have built a set of three classes:
>
> - A super class, let's call it: Base
[...]
> I would like to add is some "insurance" that I (or someone else who uses
> my code) never instantiates my Base class, It is not intended to be
> instant
> On Feb 23, 2017, at 4:40 PM, MRAB wrote:
>
> On 2017-02-24 00:19, Irv Kalb wrote:
>> Hi,
>>
>> I have built a set of three classes:
>>
>> - A super class, let's call it: Base
>>
>> - A class that inherits from Base, let's call that: ClassA
>>
>> - Another class that inherits from Base,
Irv Kalb wrote:
> Hi,
>
> I have built a set of three classes:
>
> - A super class, let's call it: Base
>
> - A class that inherits from Base, let's call that: ClassA
>
> - Another class that inherits from Base, let's call that: ClassB
>
> ClassA and ClassB have some code in their __init__
On 2017-02-24 00:19, Irv Kalb wrote:
Hi,
I have built a set of three classes:
- A super class, let's call it: Base
- A class that inherits from Base, let's call that: ClassA
- Another class that inherits from Base, let's call that: ClassB
ClassA and ClassB have some code in their __init__
Hi,
I have built a set of three classes:
- A super class, let's call it: Base
- A class that inherits from Base, let's call that: ClassA
- Another class that inherits from Base, let's call that: ClassB
ClassA and ClassB have some code in their __init__ methods that set some
instance variab