[Python-checkins] r43551 - python/branches/release24-maint/Lib/inspect.py (original) (raw)

armin.rigo python-checkins at python.org
Sun Apr 2 12:48:08 CEST 2006


Author: armin.rigo Date: Sun Apr 2 12:48:07 2006 New Revision: 43551

Modified: python/branches/release24-maint/Lib/inspect.py Log: Backport of r39612: some more fixes for inspect.getsource(). Tests not included (the format changes and I can't be bothered to port them).

Modified: python/branches/release24-maint/Lib/inspect.py

--- python/branches/release24-maint/Lib/inspect.py (original) +++ python/branches/release24-maint/Lib/inspect.py Sun Apr 2 12:48:07 2006 @@ -484,19 +484,6 @@ comments[-1:] = [] return string.join(comments, '') -class ListReader: - """Provide a readline() method to return lines from a list of strings.""" - def init(self, lines): - self.lines = lines - self.index = 0

@@ -506,40 +493,46 @@ self.islambda = False self.started = False self.passline = False

def getblock(lines): """Extract the block of code at the top of the given list of lines."""

def getsourcelines(object): """Return a list of source lines and starting line number for an object.



More information about the Python-checkins mailing list