Re: [Python-ideas] threading lock and isinstance

2018-03-29 Thread Guido van Rossum
You should probably first explain your use case -- why is it important to your code to be able to use isinstance() on locks? On Thu, Mar 29, 2018 at 2:43 AM, Jacco van Dorp wrote: > Currently, you cannot use isinstance checks on threading locks, because > they're created

[Python-ideas] threading lock and isinstance

2018-03-29 Thread Jacco van Dorp
Currently, you cannot use isinstance checks on threading locks, because they're created by a factory function instead of being actual classes. Now that we've got __subclasshook__ and __instancecheck__, is there still a reason other than "history" that we can't use isinstance here ? There could