projects
/
python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
08e5427
)
SF bug #668906: class browser raises AttributeError
author
Raymond Hettinger
<python@rcn.com>
Sat, 18 Jan 2003 22:53:36 +0000
(22:53 +0000)
committer
Raymond Hettinger
<python@rcn.com>
Sat, 18 Jan 2003 22:53:36 +0000
(22:53 +0000)
The Py2.3 updates to the pyclbr module return both Class and Function
objects. The IDLE ClassBrowser module only knew about Class and could
not handle objects which did not define "super".
Fixed by adding a guard.
Tools/idle/ClassBrowser.py
patch
|
blob
|
history
diff --git
a/Tools/idle/ClassBrowser.py
b/Tools/idle/ClassBrowser.py
index 338836a9fa332f573250f3a42809e420efbe3481..f01f249ed81295091e48bdb2ea42fc74dea3d337 100644
(file)
--- a/
Tools/idle/ClassBrowser.py
+++ b/
Tools/idle/ClassBrowser.py
@@
-98,7
+98,7
@@
class ModuleBrowserTreeItem(TreeItem):
for key, cl in dict.items():
if cl.module == name:
s = key
- if cl.super:
+ if
hasattr(cl, "super") and
cl.super:
supers = []
for sup in cl.super:
if type(sup) is type(''):