Run 2to3 over the Demo/ directory to shut up parse errors from 2to3 about lingering print statements.
diff --git a/Demo/metaclasses/Meta.py b/Demo/metaclasses/Meta.py
index 9529e0f..90bfd97 100644
--- a/Demo/metaclasses/Meta.py
+++ b/Demo/metaclasses/Meta.py
@@ -31,7 +31,7 @@
try:
ga = self.__formalclass__.__getattr__('__usergetattr__')
except (KeyError, AttributeError):
- raise AttributeError, name
+ raise AttributeError(name)
return ga(self, name)
if type(raw) != types.FunctionType:
return raw
@@ -71,7 +71,7 @@
return base.__getattr__(name)
except AttributeError:
pass
- raise AttributeError, name
+ raise AttributeError(name)
def __setattr__(self, name, value):
if not self.__inited:
@@ -96,20 +96,20 @@
def _test():
class C(Meta):
def __init__(self, *args):
- print "__init__, args =", args
+ print("__init__, args =", args)
def m1(self, x):
- print "m1(x=%r)" % (x,)
- print C
+ print("m1(x=%r)" % (x,))
+ print(C)
x = C()
- print x
+ print(x)
x.m1(12)
class D(C):
def __getattr__(self, name):
- if name[:2] == '__': raise AttributeError, name
+ if name[:2] == '__': raise AttributeError(name)
return "getattr:%s" % name
x = D()
- print x.foo
- print x._foo
+ print(x.foo)
+ print(x._foo)
## print x.__foo
## print x.__foo__