Changeset 5491


Ignore:
Timestamp:
Jan 13, 2012 10:45:01 PM (8 years ago)
Author:
wehart
Message:

Updates to allow for help() to be used without
arguments.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • coopr.core/trunk/coopr/core/_common.py

    r5489 r5491  
    88old_help = help
    99
    10 def help(thing):
    11     if hasattr(thing, '__help__'):
     10def help(thing=None):
     11    if not thing is None and hasattr(thing, '__help__'):
    1212        print thing.__help__
    1313    else:
    1414        old_help(thing)
    1515
    16 __builtins__['help'] = help
     16try:
     17    __builtins__['help'] = help
     18except:
     19    # If this fails, then just die silently.
     20    pass
Note: See TracChangeset for help on using the changeset viewer.