Neil, thank you for doing much better job explaining the problem.
Generally, I'm cool with Python's standard library classes not calling super(),
as many of them
are not designed for subclassing. But those which are should do that. E.g. take
a look at more
recent asyncio's Protocol and Transport
On Fri, 27 Oct 2017 13:59:01 -0700
Ilya Kulakov
wrote:
> Since one of the legit use-cases of using the Thread class is subclassing,
> I think it's __init__ should call super() to support cooperative inheritance.
Not to derail this thread, but I find it much clearer to use the
functional form of t
On Sat, Oct 28, 2017 at 7:15 AM Steven D'Aprano wrote:
> On Sat, Oct 28, 2017 at 12:14:31AM -0700, Neil Girdhar wrote:
> >
> >
> > On Friday, October 27, 2017 at 8:05:17 PM UTC-4, Steven D'Aprano wrote:
> > >
> > > On Fri, Oct 27, 2017 at 01:59:01PM -0700, Ilya Kulakov wrote:
> > >
> > > > Since
On Sat, Oct 28, 2017 at 12:14:31AM -0700, Neil Girdhar wrote:
>
>
> On Friday, October 27, 2017 at 8:05:17 PM UTC-4, Steven D'Aprano wrote:
> >
> > On Fri, Oct 27, 2017 at 01:59:01PM -0700, Ilya Kulakov wrote:
> >
> > > Since one of the legit use-cases of using the Thread class is
> > subclassi
I meant:
class SomeBase:
def __init__(self, base_x, **kwargs):
super().__init__(**kwargs)
self.base_x = base_x
On Saturday, October 28, 2017 at 3:14:31 AM UTC-4, Neil Girdhar wrote:
>
>
>
> On Friday, October 27, 2017 at 8:05:17 PM UTC-4, Steven D'Aprano wrote:
>>
>> On Fri,
On Friday, October 27, 2017 at 8:05:17 PM UTC-4, Steven D'Aprano wrote:
>
> On Fri, Oct 27, 2017 at 01:59:01PM -0700, Ilya Kulakov wrote:
>
> > Since one of the legit use-cases of using the Thread class is
> subclassing,
> > I think it's __init__ should call super() to support cooperative
> i
Out of curiosity, what is the benefit of not calling super from
Thread.__init__?
On Friday, October 27, 2017 at 7:29:17 PM UTC-4, Guido van Rossum wrote:
>
> You can subclass Thread just fine, you just can't have it in a multiple
> inheritance hierarchy except at the end of the MRO (before objec
On Fri, Oct 27, 2017 at 01:59:01PM -0700, Ilya Kulakov wrote:
> Since one of the legit use-cases of using the Thread class is subclassing,
> I think it's __init__ should call super() to support cooperative inheritance.
>
> Or perhaps there is a good reason for not doing so?
Are you talking about
You can subclass Thread just fine, you just can't have it in a multiple
inheritance hierarchy except at the end of the MRO (before object). That
shouldn't stop you from doing anything you want though -- you can define
e.g.
class MyThread(Thread):
def __init__(self, *args, **kwds):
Thre
Since one of the legit use-cases of using the Thread class is subclassing,
I think it's __init__ should call super() to support cooperative inheritance.
Or perhaps there is a good reason for not doing so?
Best Regards,
Ilya Kulakov
___
Python-ideas mai
10 matches
Mail list logo