Author rhettinger
Recipients matrixise, rhettinger
Date 2019-03-23.01:14:57
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1553303697.48.0.0510841298512.issue36401@roundup.psfhosted.org>
In-reply-to
Content
> but can we do the same thing with the PyGetSetDef declaration 
> for the C Part?

The would likely take an API change.  For now, using only what is already exposed in Python, we can only partition data descriptors in two groups:

* Known to be readonly because __set__ is missing or fset is None
* Possibly writeable, can't really tell until __set__ is called

Example in the latter category,  

    >>> t = time.localtime()
    >>> hasattr(type(t).tm_sec, '__set__')
    True
    >>> t.tm_sec = 31
    Traceback (most recent call last):
      File "<pyshell#23>", line 1, in <module>
         t.tm_sec = 31
    AttributeError: readonly attribute
History
Date User Action Args
2019-03-23 01:14:57rhettingersetrecipients: + rhettinger, matrixise
2019-03-23 01:14:57rhettingersetmessageid: <1553303697.48.0.0510841298512.issue36401@roundup.psfhosted.org>
2019-03-23 01:14:57rhettingerlinkissue36401 messages
2019-03-23 01:14:57rhettingercreate