[Python-checkins] python/dist/src/Lib inspect.py,1.54,1.55
jlgijsbers at users.sourceforge.net
jlgijsbers at users.sourceforge.net
Sat Sep 11 17:53:25 CEST 2004
- Previous message: [Python-checkins] python/dist/src/Doc/lib liboptparse.tex, 1.14,
1.15
- Next message: [Python-checkins] python/dist/src/Demo/scripts eqfix.py, 1.9,
1.10 fact.py, 1.7, 1.8 ftpstats.py, 1.6, 1.7 lpwatch.py, 1.9,
1.10 makedir.py, 1.5, 1.6 markov.py, 1.5, 1.6 mboxconvert.py,
1.6, 1.7 mkrcs.py, 1.6, 1.7 newslist.py, 1.12, 1.13 pi.py, 1.6,
1.7 primes.py, 1.5, 1.6 unbirthday.py, 1.4, 1.5 update.py, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /cvsroot/python/python/dist/src/Lib
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv2914
Modified Files:
inspect.py
Log Message:
Use __module__ attribute when available instead of using isclass() predicate
(functions and methods have grown the __module__ attribute too). See bug #570300.
Index: inspect.py
===================================================================
RCS file: /cvsroot/python/python/dist/src/Lib/inspect.py,v
retrieving revision 1.54
retrieving revision 1.55
diff -u -d -r1.54 -r1.55
--- inspect.py 18 Aug 2004 12:40:30 -0000 1.54
+++ inspect.py 11 Sep 2004 15:53:22 -0000 1.55
@@ -370,7 +370,7 @@
"""Return the module an object was defined in, or None if not found."""
if ismodule(object):
return object
- if isclass(object):
+ if hasattr(object, '__module__'):
return sys.modules.get(object.__module__)
try:
file = getabsfile(object)
- Previous message: [Python-checkins] python/dist/src/Doc/lib liboptparse.tex, 1.14,
1.15
- Next message: [Python-checkins] python/dist/src/Demo/scripts eqfix.py, 1.9,
1.10 fact.py, 1.7, 1.8 ftpstats.py, 1.6, 1.7 lpwatch.py, 1.9,
1.10 makedir.py, 1.5, 1.6 markov.py, 1.5, 1.6 mboxconvert.py,
1.6, 1.7 mkrcs.py, 1.6, 1.7 newslist.py, 1.12, 1.13 pi.py, 1.6,
1.7 primes.py, 1.5, 1.6 unbirthday.py, 1.4, 1.5 update.py, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Python-checkins
mailing list