projects
/
zzz-pokedex.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
2a8dec4
)
Add __repr__ to mapped classes
author
Petr Viktorin
<encukou@gmail.com>
Sun, 3 Apr 2011 18:00:58 +0000
(21:00 +0300)
committer
Petr Viktorin
<encukou@gmail.com>
Sun, 3 Apr 2011 18:18:37 +0000
(21:18 +0300)
This makes string representations of lists, tuples, dicts, etc. with the
DB objects make sense
pokedex/db/tables.py
patch
|
blob
|
history
diff --git
a/pokedex/db/tables.py
b/pokedex/db/tables.py
index
5670da9
..
55cd487
100644
(file)
--- a/
pokedex/db/tables.py
+++ b/
pokedex/db/tables.py
@@
-62,6
+62,9
@@
class TableSuperclass(object):
def __str__(self):
return unicode(self).encode('utf8')
+ def __repr__(self):
+ return unicode(self).encode('utf8')
+
mapped_classes = []
class TableMetaclass(DeclarativeMeta):
def __init__(cls, name, bases, attrs):