Final merge from trunk

git-svn-id: https://swig.svn.sourceforge.net/svnroot/swig/branches/szager-python-builtin@12595 626c5289-ae23-0410-ae9c-e8d60b6d4f22
This commit is contained in:
Stefan Zager 2011-04-03 07:37:35 +00:00
commit 0cdf8658c7
9 changed files with 114 additions and 165 deletions

View file

@ -13,7 +13,6 @@ except:
if not err:
raise RuntimeError, "A is not static"
class B(python_nondynamic.A):
c = 4
def __init__(self):
@ -21,13 +20,18 @@ class B(python_nondynamic.A):
pass
pass
bb = B()
# This is questionable. Trying to set B.c? That's not what it does.
# Should fail, I think, but it doesn't.
#bb.c = 3
try:
bb.c = 3
err = 0
except:
err = 1
if not err:
print "bb.c = %d" % bb.c
print "B.c = %d" % B.c
raise RuntimeError, "B.c class variable messes up nondynamic-ness of B"
try:
bb.d = 2
@ -37,7 +41,6 @@ except:
if not err:
raise RuntimeError, "B is not static"
cc = python_nondynamic.C()
cc.d = 3