Does functools.update_wrapper() *copy* __doc__ and __annotations__ or *reference* those function/method attributes so that the API docs have the docstrings and tools with type annotation support have the correct type annotations?
https://docs.python.org/3/library/functools.html#functools.update_wrapper
On Saturday, November 30, 2019, Greg Ewing <greg.ewing@canterbury.ac.nz> wrote:
> On 1/12/19 5:00 am, Ricky Teachey wrote:
>>
>> Perhaps aliases of objects could be something worth baking into the language itself.
>
> We would have to be using aliases a *lot* to make something like
> this worthwhile. I don't think that's something we should be doing
> or encouraging.
>
> Also, for the use case being considered -- renaming functions and
> methods -- garbage collection is hardly an issue.
>
> If you want the help for an alias to be different from the thing
> it aliases, you can achieve that now using a stub function that
> delegates to the replacement.
>
> --
> Greg
> _______________________________________________
> Python-ideas mailing list -- python-ideas@python.org
> To unsubscribe send an email to python-ideas-leave@python.org
> https://mail.python.org/mailman3/lists/python-ideas.python.org/
> Message archived at https://mail.python.org/archives/list/python-ideas@python.org/message/FEERFEPMQ3T5W65HGKNYKYM6VMU3M3TS/
> Code of Conduct: http://python.org/psf/codeofconduct/
>