This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author mark.dickinson
Recipients mark.dickinson, paul.moore, steve.dower, tim.golden, zach.ware, 임수진학부생
Date 2020-02-08.10:14:30
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1581156871.05.0.0249876649386.issue39581@roundup.psfhosted.org>
In-reply-to
Content
There's no other reasonable way for Python to work here. It *is* an error to pass something that's not a callable as a thread "target", but it's a coding error that can only be detected at runtime, not a syntax error that can be detected statically before the code executes.

And because threadFunc() never returns, Python never gets the opportunity to check the arguments to threading.Thread: the arguments to a function call have to be evaluated before that function call can be made.

It is a fairly common error, though, and it might be possible for a linter to flag this error (though probably with a smattering of false positives and false negatives). That's out of scope for Python itself.
History
Date User Action Args
2020-02-08 10:14:31mark.dickinsonsetrecipients: + mark.dickinson, paul.moore, tim.golden, zach.ware, steve.dower, 임수진학부생
2020-02-08 10:14:31mark.dickinsonsetmessageid: <1581156871.05.0.0249876649386.issue39581@roundup.psfhosted.org>
2020-02-08 10:14:31mark.dickinsonlinkissue39581 messages
2020-02-08 10:14:30mark.dickinsoncreate