Author hauntsaninja
Recipients hauntsaninja
Date 2020-01-30.00:37:07
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hello! has the following definition of `closed`:
    def closed(self) -> bool:

This is inconsistent with the behaviour at runtime:
In [17]: sys.version                                                                                                  
Out[17]: '3.8.1 (default, Jan 23 2020, 23:36:06) \n[Clang 11.0.0 (clang-1100.0.33.17)]'

In [18]: f = open("test", "w")                                                                                        

In [19]: f.closed                                                                                                     
Out[19]: False

It seems like the right thing to do is add an @property, as we do with e.g. `mode` and `name`. I'll submit a PR with this change.

Note typeshed also types this as a property to indicate a read-only attribute.

First time filing a bug on BPO, thanks a lot in advance!
Date User Action Args
2020-01-30 00:37:08hauntsaninjasetrecipients: + hauntsaninja
2020-01-30 00:37:08hauntsaninjasetmessageid: <>
2020-01-30 00:37:07hauntsaninjalinkissue39493 messages
2020-01-30 00:37:07hauntsaninjacreate