Mercurial > cpython-lru_cache-weakref
diff Doc/perl/python.perl @ 17778:b4b3657cb1fa legacy-trunk
Define a new environment, classdesc*, which can be used to document a
class without providing any information about the constructor. This
should be used for classes which only exist to act as containers rather
than as factories for instances.
| author | Fred Drake <fdrake@acm.org> |
|---|---|
| date | Fri, 11 May 2001 01:00:30 +0000 |
| parents | f63f749364ef |
| children | e328218546b5 |
line wrap: on
line diff
--- a/Doc/perl/python.perl Thu May 10 22:37:38 2001 +0000 +++ b/Doc/perl/python.perl Fri May 11 01:00:30 2001 +0000 @@ -906,6 +906,17 @@ return handle_classlike_descriptor(@_[0], "class"); } +sub do_env_classdescstar{ + local($_) = @_; + $THIS_CLASS = next_argument(); + $idx = make_str_index_entry( + "<tt class='class'>$THIS_CLASS</tt> (class in $THIS_MODULE)" ); + $idx =~ s/ \(.*\)//; + return ("<dl><dt><b>class $idx</b>\n<dd>" + . $_ + . '</dl>'); +} + sub do_env_excclassdesc{ return handle_classlike_descriptor(@_[0], "exception"); }
