A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2003-March/034240.html below:

[Python-Dev] Doc strings for typeslots?

[Python-Dev] Doc strings for typeslots? [Python-Dev] Doc strings for typeslots?Guido van Rossum guido@python.org
Tue, 25 Mar 2003 18:02:14 -0500
> A Pyrex user recently pointed out to me that trying
> to give a docstring to an __xxx__ method of an
> extension type doesn't work.
> 
> The reason for this is that the C functions implementing
> these methods live in slots of the typeobject, and there's
> apparently nowhere to put docstrings for them.
> 
> I'm speculating that this could be worked around by
> getting the slot's wrapper object out of the type
> dict after the type is initialised, and stuffing a
> docstring into it.
> 
> This would only work if a new set of wrappers is created
> for each type, rather than re-using generic ones. An
> experiment suggests that this is what happens -- can
> anyone confirm this?
> 
> Or, is there a better way of giving these things
> docstrings that I've missed?

Um, I'm afraid this is how it is.  __xxx__ methods have generic
docstrings. :-(

--Guido van Rossum (home page: http://www.python.org/~guido/)



RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4