[issue39125] Type signature of @property not shown in help()
New submission from Nguyễn Gia Phong
Foo.bar.fget.__annotations__ {'return':
} Foo.bar.fset.__annotations__ {'value': , 'return': None}
Have a Merry Christmas or other holiday of your choice,
Nguyễn Gia Phong
----------
assignee: docs@python
components: Documentation
messages: 358823
nosy: McSinyx, docs@python
priority: normal
severity: normal
status: open
title: Type signature of @property not shown in help()
type: enhancement
versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9
_______________________________________
Python tracker
Karthikeyan Singaravelan
Nguyễn Gia Phong
Change by Nguyễn Gia Phong
brenthuisman
Raymond Hettinger
Currently there is no way to tell if the *attribute* is read-only, read-write or write-only.
Read-only is segregated in the help() output.
class A: @property def computed_field(self): 'An example property'
help(A) Help on class A in module __main__:
class A(builtins.object)
| Readonly properties defined here:
|
| computed_field
| An example property
|
| ----------------------------------------------------------------------
| Data descriptors defined here:
|
| __dict__
| dictionary for instance variables (if defined)
|
| __weakref__
----------
_______________________________________
Python tracker
participants (4)
-
brenthuisman
-
Karthikeyan Singaravelan
-
Nguyễn Gia Phong
-
Raymond Hettinger