summaryrefslogtreecommitdiffstats
path: root/Lib/inspect.py
Commit message (Collapse)AuthorAgeFilesLines
* Preliminary support for "from __future__ import generators" to enableGuido van Rossum2001-07-151-0/+2
| | | | | | | | the yield statement. I figure we have to have this in before I can release 2.2a1 on Wednesday. Note: test_generators is currently broken, I'm counting on Tim to fix this.
* Turns out Neil didn't intend for *all* of his gen-branch work to getTim Peters2001-06-291-19/+23
| | | | | | | | | | | | | | | | | | | | committed. tokenize.py: I like these changes, and have tested them extensively without even realizing it, so I just updated the docstring and the docs. tabnanny.py: Also liked this, but did a little code fiddling. I should really rewrite this to *exploit* generators, but that's near the bottom of my effort/benefit scale so doubt I'll get to it anytime soon (it would be most useful as a non-trivial example of ideal use of generators; but test_generators.py has already grown plenty of food-for-thought examples). inspect.py: I'm sure Ping intended for this to continue running even under 1.5.2, so I reverted this to the last pre-gen-branch version. The "bugfix" I checked in in-between was actually repairing a bug *introduced* by the conversion to generators, so it's OK that the reverted version doesn't reflect that checkin.
* Merging the gen-branch into the main line, at Guido's direction. Yay!Tim Peters2001-06-181-23/+19
| | | | | Bugfix candidate in inspect.py: it was referencing "self" outside of a method.
* Clean up isroutine().Ka-Ping Yee2001-04-131-2/+1
|
* Robustify getfile() against classes that lie about their __module__sKa-Ping Yee2001-04-131-1/+1
| | | | (such as the exceptions in _weakref and _locale!)
* Remove duplicate type objects from isroutine() and isbuiltin().Ka-Ping Yee2001-04-131-4/+4
| | | | Make getmodule() on a module return the module itself.
* Robustify getcomments() so it doesn't crash on empty files.Ka-Ping Yee2001-04-121-2/+2
|
* Add getmodulename() and getmoduleinfo() routines to inspect filenames.Ka-Ping Yee2001-04-101-0/+15
|
* Extend isclass() to work for extension classes (by looking for __bases__).Ka-Ping Yee2001-03-231-1/+1
|
* Don't have trace() skip the top frame; return them all.Ka-Ping Yee2001-03-231-1/+0
|
* Whitespace normalization.Tim Peters2001-03-161-2/+0
|
* Fix findsource() to work for derived classes.Ka-Ping Yee2001-03-101-5/+5
|
* Make getsourcefile() succeed even if the filename doesn't end in '.py' --Ka-Ping Yee2001-03-021-25/+29
| | | | | | | as long as the filename also doesn't end in a suffix that indicates a binary file (according to the flags in imp.get_suffixes()). Shrink try...except clauses and replace some of them with explicit checks.
* Clarify the purpose of getsourcefile().Ka-Ping Yee2001-03-021-12/+19
| | | | Add getabsfile() for getting a most-normalized path.
* When seeking the module for an object, compare absolute (not relative) paths.Ka-Ping Yee2001-03-021-3/+4
|
* Add __author__ variable.Ka-Ping Yee2001-03-011-2/+5
| | | | Robustify: don't rely on modules being present in sys.modules.
* Add getlineno() routine to account for LINENO optimization.Ka-Ping Yee2001-03-011-3/+19
|
* Whitespace normalization.Tim Peters2001-02-281-1/+1
|
* inspect: a module for getting information out of live Python objectsKa-Ping Yee2001-02-271-0/+616