[Python-Dev] Python 2.1 PEPs
Paul Prescod
paulp@ActiveState.com
Tue, 17 Apr 2001 11:58:42 -0700
Thomas Wouters wrote:
>
> On Tue, Apr 17, 2001 at 10:28:15AM -0700, Paul Prescod wrote:
>
> > All it would take now is
> >
> > class help:
> > def __repr__(self):
> > import pydoc
> > __builtins__.help = pydoc.help
> > repr(__builtins__.help)
>
> > But hindsight is 20/20.
>
> You realize this isn't going to work, right ? The 'help' class will shadow
> the 'help' builtin.
We do not have to call the class "help" nor to define it in the __main__
or __builtins__ context. Or were you getting at something deeper?
--
Take a recipe. Leave a recipe.
Python Cookbook! http://www.ActiveState.com/pythoncookbook