~ubuntu-branches/ubuntu/oneiric/python2.6/oneiric

« back to all changes in this revision

Viewing changes to Lib/pydoc.py

  • Committer: Bazaar Package Importer
  • Author(s): Matthias Klose
  • Date: 2010-08-07 20:03:08 UTC
  • mfrom: (10.1.27 sid)
  • Revision ID: james.westby@ubuntu.com-20100807200308-bwsyymoc4donr9a9
Tags: 2.6.6~rc1-1ubuntu1
* Merge with Debian; remaining changes:
  - Regenerate the control file.

Show diffs side-by-side

added added

removed removed

Lines of Context:
37
37
__author__ = "Ka-Ping Yee <ping@lfw.org>"
38
38
__date__ = "26 February 2001"
39
39
 
40
 
__version__ = "$Revision: 79544 $"
 
40
__version__ = "$Revision: 83492 $"
41
41
__credits__ = """Guido van Rossum, for an excellent programming language.
42
42
Tommy Burnette, the original creator of manpy.
43
43
Paul Prescod, for all his work on onlinehelp.
1705
1705
        'CONTEXTMANAGERS': ('context-managers', 'with'),
1706
1706
    }
1707
1707
 
1708
 
    def __init__(self, input, output):
1709
 
        self.input = input
1710
 
        self.output = output
 
1708
    def __init__(self, input=None, output=None):
 
1709
        self._input = input
 
1710
        self._output = output
 
1711
 
 
1712
    input  = property(lambda self: self._input or sys.stdin)
 
1713
    output = property(lambda self: self._output or sys.stdout)
1711
1714
 
1712
1715
    def __repr__(self):
1713
1716
        if inspect.stack()[1][3] == '?':
1884
1887
for modules whose descriptions contain the word "spam".
1885
1888
''')
1886
1889
 
1887
 
help = Helper(sys.stdin, sys.stdout)
 
1890
help = Helper()
1888
1891
 
1889
1892
class Scanner:
1890
1893
    """A generic tree iterator."""