threading.Thread.start should return self #93293
Labels
docs
Documentation in the Doc dir
stdlib
Python modules in the Lib dir
type-feature
A feature request or enhancement
I often write code like:
and would really prefer:
Is there a reason why
start
doesn't returnself
here: https://github.com/python/cpython/blob/3.10/Lib/threading.py#L940 ?An alternative would be to add a
start: bool = False
param to theThread
constructor such that you can construct it withstart=True
. I'm not sure why you'd ever want to construct a Thread but not start it, so I wish that could default to true, but clearly it can't due to backwards compatibility.The text was updated successfully, but these errors were encountered: