From 68468eba635570400f607e140425a222018e56f9 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Thu, 27 Feb 2003 20:14:51 +0000 Subject: Get rid of many apply() calls. --- Lib/pydoc.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'Lib/pydoc.py') diff --git a/Lib/pydoc.py b/Lib/pydoc.py index 4513733203..90df45bd82 100755 --- a/Lib/pydoc.py +++ b/Lib/pydoc.py @@ -266,10 +266,10 @@ class Doc: def document(self, object, name=None, *args): """Generate documentation for an object.""" args = (object, name) + args - if inspect.ismodule(object): return apply(self.docmodule, args) - if inspect.isclass(object): return apply(self.docclass, args) - if inspect.isroutine(object): return apply(self.docroutine, args) - return apply(self.docother, args) + if inspect.ismodule(object): return self.docmodule(*args) + if inspect.isclass(object): return self.docclass(*args) + if inspect.isroutine(object): returnself.docroutine(*args) + return self.docother(*args) def fail(self, object, name=None, *args): """Raise an exception for unimplemented types.""" @@ -379,7 +379,7 @@ TT { font-family: lucidatypewriter, lucida console, courier } def bigsection(self, title, *args): """Format a section with a big heading.""" title = '%s' % title - return apply(self.section, (title,) + args) + return self.section(title, *args) def preformat(self, text): """Format literal preformatted text.""" -- cgit v1.2.1