summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Peters <tim.peters@gmail.com>2001-10-15 22:53:29 (GMT)
committerTim Peters <tim.peters@gmail.com>2001-10-15 22:53:29 (GMT)
commit6006629c3c7bb6fa0a7901120149eca73ff40b8a (patch)
treed83673cf518870870e06b9aa5053e93b0ee95bb5
parent1ce150c675c946b5f626ca6bce2cb7eaba94d019 (diff)
downloadcpython-6006629c3c7bb6fa0a7901120149eca73ff40b8a.zip
cpython-6006629c3c7bb6fa0a7901120149eca73ff40b8a.tar.gz
cpython-6006629c3c7bb6fa0a7901120149eca73ff40b8a.tar.bz2
Remove obsolete __dynamic__ distinction.
-rw-r--r--Lib/test/test_inspect.py75
-rw-r--r--Lib/xml/dom/minidom.py2
2 files changed, 1 insertions, 76 deletions
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index 9167b14..58b7570 100644
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -297,10 +297,9 @@ test(('m', 'method', B) in attrs, 'missing plain method')
test(('m1', 'method', D) in attrs, 'missing plain method')
test(('datablob', 'data', A) in attrs, 'missing data')
-# Repeat all that, but w/ new-style non-dynamic classes.
+# Repeat all that, but w/ new-style classes.
class A(object):
- __dynamic__ = 0
def s(): pass
s = staticmethod(s)
@@ -326,7 +325,6 @@ test(('m1', 'method', A) in attrs, 'missing plain method')
test(('datablob', 'data', A) in attrs, 'missing data')
class B(A):
- __dynamic__ = 0
def m(self): pass
@@ -340,7 +338,6 @@ test(('datablob', 'data', A) in attrs, 'missing data')
class C(A):
- __dynamic__ = 0
def m(self): pass
def c(self): pass
@@ -354,76 +351,6 @@ test(('m1', 'method', A) in attrs, 'missing plain method')
test(('datablob', 'data', A) in attrs, 'missing data')
class D(B, C):
- __dynamic__ = 0
-
- def m1(self): pass
-
-attrs = attrs_wo_objs(D)
-test(('s', 'static method', A) in attrs, 'missing static method')
-test(('c', 'method', C) in attrs, 'missing plain method')
-test(('p', 'property', A) in attrs, 'missing property')
-test(('m', 'method', B) in attrs, 'missing plain method')
-test(('m1', 'method', D) in attrs, 'missing plain method')
-test(('datablob', 'data', A) in attrs, 'missing data')
-
-# And again, but w/ new-style dynamic classes.
-
-class A(object):
- __dynamic__ = 1
-
- def s(): pass
- s = staticmethod(s)
-
- def c(cls): pass
- c = classmethod(c)
-
- def getp(self): pass
- p = property(getp)
-
- def m(self): pass
-
- def m1(self): pass
-
- datablob = '1'
-
-attrs = attrs_wo_objs(A)
-test(('s', 'static method', A) in attrs, 'missing static method')
-test(('c', 'class method', A) in attrs, 'missing class method')
-test(('p', 'property', A) in attrs, 'missing property')
-test(('m', 'method', A) in attrs, 'missing plain method')
-test(('m1', 'method', A) in attrs, 'missing plain method')
-test(('datablob', 'data', A) in attrs, 'missing data')
-
-class B(A):
- __dynamic__ = 1
-
- def m(self): pass
-
-attrs = attrs_wo_objs(B)
-test(('s', 'static method', A) in attrs, 'missing static method')
-test(('c', 'class method', A) in attrs, 'missing class method')
-test(('p', 'property', A) in attrs, 'missing property')
-test(('m', 'method', B) in attrs, 'missing plain method')
-test(('m1', 'method', A) in attrs, 'missing plain method')
-test(('datablob', 'data', A) in attrs, 'missing data')
-
-
-class C(A):
- __dynamic__ = 1
-
- def m(self): pass
- def c(self): pass
-
-attrs = attrs_wo_objs(C)
-test(('s', 'static method', A) in attrs, 'missing static method')
-test(('c', 'method', C) in attrs, 'missing plain method')
-test(('p', 'property', A) in attrs, 'missing property')
-test(('m', 'method', C) in attrs, 'missing plain method')
-test(('m1', 'method', A) in attrs, 'missing plain method')
-test(('datablob', 'data', A) in attrs, 'missing data')
-
-class D(B, C):
- __dynamic__ = 1
def m1(self): pass
diff --git a/Lib/xml/dom/minidom.py b/Lib/xml/dom/minidom.py
index 8a84d0f..510817e 100644
--- a/Lib/xml/dom/minidom.py
+++ b/Lib/xml/dom/minidom.py
@@ -34,8 +34,6 @@ import xml.dom
if list is type([]):
class NodeList(list):
- __dynamic__ = 0
-
def item(self, index):
if 0 <= index < len(self):
return self[index]