<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array"/>
  <modified type="array">
    <modified>
      <diff>@@ -95,28 +95,34 @@ class ModelConstructor(type):
         super(ModelConstructor, cls).__init__(name, bases, dct)
 
 # Map SQLAlchemy's types to string versions of them for convenience
-column_mapping = {'string':      String,      'str':      String,
-                  'integer':     Integer,     'int':      Integer, 
-                  'unicode':     Unicode,     'text':     Text,
-                  'unicodetext': UnicodeText, 'date':     Date,
-                  'numeric':     Numeric,     'time':     Time,
-                  'float':       Float,       'datetime': DateTime,
-                  'interval':    Interval,    'binary':   Binary,
-                  'boolean':     Boolean,     'bool':     Boolean,
+column_mapping = {'string':      String,      'str': String,
+                  'integer':     Integer,     'int': Integer, 
+                  'unicode':     Unicode,
+                  'text':        Text,
+                  'unicodetext': UnicodeText,
+                  'date':        Date,
+                  'numeric':     Numeric,
+                  'time':        Time,
+                  'float':       Float,
+                  'datetime':    DateTime,
+                  'interval':    Interval,
+                  'binary':      Binary,
+                  'boolean':     Boolean,     'bool': Boolean,
                   'pickletype':  PickleType,
                  }
 
-#
+###
 # Functions added to created classes
-#
+###
 
 # Generic __init__ to set instance variables of a class.
 def init_func(self, **kwargs):
-    for key, val in kwargs.items(): self.__dict__[key] = val
+    for key, val in kwargs.items(): 
+        self.__dict__[key] = val
 
 # Generic __repr__ to print the class name and database id
 def repr_func(self):
-    return '&lt;%s: %s&gt;' %(self.__name__, self.id)
+    return '&lt;%s: %s&gt;' % (self.__name__, self.id)
 
 # Add and commit and instance to the session
 def save_func(self):
@@ -138,15 +144,15 @@ def filter_by_func(cls, **kwargs): return cls.session.query(cls).filter_by(**kwa
 
 # Code below in progress, not currently used
 
-def attr_func(self, attr):
-    if attr in ['__name__', '__repr__', '__init__']:
-        return object.__getattribute__(attr)
-    q = self.find()
-    print 'self: %s' %self
-    print 'attr: %s' %attr
-    print 'q: %s' %q
-    return q.__getattribute__(attr)
-    #return lambda: q.__getattribute__(attr)
+def attr_func(self, attr, *args, **kwargs):
+    if attr in ['all']:
+        q = self.find()
+        print 'self: %s' %self
+        print 'attr: %s' %attr
+        print 'q: %s' %q
+        return q.__getattribute__(attr)
+        #return lambda: q.__getattribute__(attr)
+    raise NotImplemented('%s does not implement %s' % (self.__name__, attr))
 
 &quot;&quot;&quot;
 Maybe make the model into the session?</diff>
      <filename>items.py</filename>
    </modified>
    <modified>
      <diff>@@ -1,6 +1,6 @@
 import items
 
-it = items.Items('sqlite:///:memory:')
+it = items.Items('sqlite:///:memory:') # This is the default
 
 Book = it.model('Book', name='string', author='string', length='int')
 
@@ -14,8 +14,8 @@ fc.save()
 
 print &quot;My Books: &quot;
 for b in Book.all():
-    print &quot;\t%s by %s (%s pages)&quot; %(b.name, b.author, b.length)
+    print &quot;\t%s by %s (%s pages)&quot; % (b.name, b.author, b.length)
 
 print &quot;Filtered List: &quot;
 for b in Book.filter(Book.name.like(&quot;Fight%&quot;)):
-    print &quot;\t%s by %s (%s pages)&quot; %(b.name, b.author, b.length)
+    print &quot;\t%s by %s (%s pages)&quot; % (b.name, b.author, b.length)</diff>
      <filename>usage.py</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>742bee72580825687a7b2e6a49eba51e996442c7</id>
    </parent>
  </parents>
  <author>
    <name>Brian Reily</name>
    <email>brian@brianreily.com</email>
  </author>
  <url>http://github.com/breily/items/commit/b47def078757204a733d01bbc8c6f3a86c78eaf5</url>
  <id>b47def078757204a733d01bbc8c6f3a86c78eaf5</id>
  <committed-date>2009-02-15T01:11:36-08:00</committed-date>
  <authored-date>2009-02-15T01:11:36-08:00</authored-date>
  <message>* Comments and layout changes</message>
  <tree>1b67300a5a67fe4d7b061687bc68e5e46af63e33</tree>
  <committer>
    <name>Brian Reily</name>
    <email>brian@brianreily.com</email>
  </committer>
</commit>
