> Why the strange check involving inspect.stack()? > inspect.stack()[1][3] is the co_name of the parent frame. > If we check that the __repr__ is not being requested by a > function call, everything works perfectly in IDLE as well > as the plain interpreter, and the helper object is still safe > to pass around. Nothing breaks even if you say help(help). This is one of the reasons why I didn't want to add this to the 2.1 release at such a late point. I have no easy way to verify that this is always true, and in fact I have no idea what inspect.stack()[1][3] means. :-( I just add "from pydoc import help" to my $PYTHONSTARTUP file. --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