summaryrefslogtreecommitdiff
path: root/examples/inheritance/single.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2013-04-27 19:53:57 -0400
committerMike Bayer <mike_mp@zzzcomputing.com>2013-04-27 19:53:57 -0400
commit4b614b9b35cd2baddb7ca67c04bee5d70ec6a172 (patch)
tree7483cd269f5823f903f96709eb864fff9b6d9383 /examples/inheritance/single.py
parent9716a5c45e6185c5871555722d8495880f0e8c7a (diff)
downloadsqlalchemy-4b614b9b35cd2baddb7ca67c04bee5d70ec6a172.tar.gz
- the raw 2to3 run
- went through examples/ and cleaned out excess list() calls
Diffstat (limited to 'examples/inheritance/single.py')
-rw-r--r--examples/inheritance/single.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/examples/inheritance/single.py b/examples/inheritance/single.py
index b2f934120..b445f74a6 100644
--- a/examples/inheritance/single.py
+++ b/examples/inheritance/single.py
@@ -23,7 +23,7 @@ employees_table = Table('employees', metadata,
class Person(object):
def __init__(self, **kwargs):
- for key, value in kwargs.iteritems():
+ for key, value in kwargs.items():
setattr(self, key, value)
def __repr__(self):
return "Ordinary person %s" % self.name
@@ -39,7 +39,7 @@ class Manager(Person):
(self.name, self.status, self.manager_name)
class Company(object):
def __init__(self, **kwargs):
- for key, value in kwargs.iteritems():
+ for key, value in kwargs.items():
setattr(self, key, value)
def __repr__(self):
return "Company %s" % self.name
@@ -79,9 +79,9 @@ session.commit()
c = session.query(Company).get(1)
for e in c.employees:
- print e, e.company
+ print(e, e.company)
-print "\n"
+print("\n")
dilbert = session.query(Person).filter_by(name='dilbert').one()
dilbert2 = session.query(Engineer).filter_by(name='dilbert').one()
@@ -94,7 +94,7 @@ session.expunge_all()
c = session.query(Company).get(1)
for e in c.employees:
- print e
+ print(e)
session.delete(c)
session.commit()