[issue39125] Type signature of @property not shown in help()

2021-04-10 Thread Raymond Hettinger
Raymond Hettinger added the comment: > 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'

[issue39125] Type signature of @property not shown in help()

2021-04-09 Thread brenthuisman
brenthuisman added the comment: Is there any activity on this issue? The way Pybind11 generates accessors for attributes makes (as properties with getter and setter) makes it currently impossible to view the type info, which Pybind does provide. Thanks for any update. -- nosy:

[issue39125] Type signature of @property not shown in help()

2020-01-02 Thread Nguyễn Gia Phong
Change by Nguyễn Gia Phong : -- versions: +Python 3.9 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe:

[issue39125] Type signature of @property not shown in help()

2019-12-30 Thread Nguyễn Gia Phong
Nguyễn Gia Phong added the comment: Relating to this, should there also be indication about the mode (get, set, del) the property? Currently there is no way to tell if the *attribute* is read-only, read-write or write-only. -- versions: -Python 3.9

[issue39125] Type signature of @property not shown in help()

2019-12-23 Thread Karthikeyan Singaravelan
Karthikeyan Singaravelan added the comment: Currently docstring written for even property.setter is ignored in help as inspect.getdoc only inspects property.fget [0] for docstrings. I feel docs for setter could also be included. The docs also indicate the same at

[issue39125] Type signature of @property not shown in help()

2019-12-23 Thread Nguyễn Gia Phong
nnotations__ {'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: n

Re: Type signature

2006-07-24 Thread paul kölle
Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], Yacao Wang wrote: However, type signatures are not only a kind of information provided for the compiler, but also for the programmer, or more important, for the programmer. Without it, we have to infer the return type or required

Re: Type signature

2006-07-24 Thread Hugo Ferreira
Which is expecially true when using IDEs with auto-completion.Using VisualStudio/MonoDevelop and C# I rarely need to look at the documentation because I can quickly see what a method accept and returns. And when I need to pass flags or options, enums are much more neat and encapsulated. With

Re: Type signature

2006-07-24 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], paul kölle wrote: Marc 'BlackJack' Rintsch wrote: In [EMAIL PROTECTED], Yacao Wang wrote: However, type signatures are not only a kind of information provided for the compiler, but also for the programmer, or more important, for the programmer. Without it, we have to

Re: Type signature

2006-07-23 Thread [EMAIL PROTECTED]
Yacao Wang wrote: Hi, I'm a newbie to Python. I've recently read some books about this language and none of them have answered my question. As a dynamically-typed language Python doesn't need any form of type signature which makes the syntax very clean and concise. However, type signatures

Re: Type signature

2006-07-23 Thread Paddy
Yacao Wang wrote: Hi, I'm a newbie to Python. I've recently read some books about this language and none of them have answered my question. As a dynamically-typed language Python doesn't need any form of type signature which makes the syntax very clean and concise. However, type signatures

Type signature

2006-07-22 Thread Yacao Wang
Hi, I'm a newbie to Python. I've recently read some books about this language and none of them have answered my question. As a dynamically-typed language Python doesn't need any form of type signature which makes the syntax very clean and concise. However, type signatures are not only a kind

Re: Type signature

2006-07-22 Thread Marc 'BlackJack' Rintsch
In [EMAIL PROTECTED], Yacao Wang wrote: However, type signatures are not only a kind of information provided for the compiler, but also for the programmer, or more important, for the programmer. Without it, we have to infer the return type or required agument types of a function, and this

Re: Type signature

2006-07-22 Thread hanumizzle
Yacao Wang wrote: Hi, I'm a newbie to Python. I've recently read some books about this language and none of them have answered my question. As a dynamically-typed language Python doesn't need any form of type signature which makes the syntax very clean and concise. OK... However, type