On 03/25/2018 09:58 AM, Serhiy Storchaka wrote:
25.03.18 19:47, Dave Halter пише:
Is there a way though in which the __text_signature__ could contain
the information `-> str` or do we need to engineer that first?

There is no such way currently.


Are you sure?  I'm pretty sure Argument Clinic signatures support "return converters", which are emitted in the text signature as a return annotation.  See the section "Using a return converter" in Doc/howto/clinic.rst.

What appears to be lacking is a "return converter" that handles strings.  I don't know how easy or hard it would be to write one--I haven't thought about Argument Clinic in years.  However, the DecodeFSDefault() returns a string type, with some extra implied constraints on the value I think.  So my guess is, it wouldn't be too hard to add a simple "str" return converter.


Cheers,


//arry/
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to