convert values to a function, fix #28 (#43)

This commit is contained in:
Samuel Colvin
2017-06-07 22:40:09 +01:00
committed by GitHub
parent 691b947576
commit ff3fa95eb0
7 changed files with 57 additions and 24 deletions
+1 -1
View File
@@ -37,7 +37,7 @@ m = Model(
email_address='Samuel Colvin <s@muelcolvin.com >',
email_and_name='Samuel Colvin <s@muelcolvin.com >',
)
print(m.values)
print(m.values())
"""
{
'cos_function': <built-in function cos>,
+1 -1
View File
@@ -17,5 +17,5 @@ class Spam(BaseModel):
m = Spam(foo={'count': 4}, bars=[{'apple': 'x1'}, {'apple': 'x2'}])
print(m)
# > Spam foo=<Foo count=4 size=None> bars=[<Bar apple='x1' banana='y'>, <Bar apple='x2' banana='y'>]
print(m.values)
print(m.values())
# {'foo': {'count': 4, 'size': None}, 'bars': [{'apple': 'x1', 'banana': 'y'}, {'apple': 'x2', 'banana': 'y'}]}