dynamo/table.new_item() class override?

12 views
Skip to first unread message

Andy Davidoff

unread,
Feb 25, 2012, 1:17:23 PM2/25/12
to boto...@googlegroups.com
Please consider the following tweak for consistency.

--- boto/dynamodb/table.py (revision 3137)
+++ boto/dynamodb/table.py (working copy)
@@ -221,12 +221,13 @@
return False
return True

- def new_item(self, hash_key, range_key=None, attrs=None):
+ def new_item(self, hash_key, range_key=None, attrs=None,
+ item_class=Item):
"""
Return an new, unsaved Item which can later be PUT to
Amazon DynamoDB.
"""
- return Item(self, hash_key, range_key, attrs)
+ return item_class(self, hash_key, range_key, attrs)

--
Andy Davidoff
disruptek.com
1-877-DISRPTK

mitch

unread,
Feb 28, 2012, 4:34:12 PM2/28/12
to boto-dev
Reply all
Reply to author
Forward
0 new messages