Message361623
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. |
|
Date |
User |
Action |
Args |
2020-02-08 10:14:31 | mark.dickinson | set | recipients:
+ mark.dickinson, paul.moore, tim.golden, zach.ware, steve.dower, 임수진학부생 |
2020-02-08 10:14:31 | mark.dickinson | set | messageid: <1581156871.05.0.0249876649386.issue39581@roundup.psfhosted.org> |
2020-02-08 10:14:31 | mark.dickinson | link | issue39581 messages |
2020-02-08 10:14:30 | mark.dickinson | create | |
|