Skip to content


Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Changed custom_methods model test/doc to add explanation of what Arti…

…cle(*row) means, for Python beginners

git-svn-id: bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
commit a4438d74f666e1f5b9e8e0c13463ec5e62a1e11f 1 parent b307fb0
@adrianholovaty adrianholovaty authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  tests/testapp/models/
2  tests/testapp/models/
@@ -48,6 +48,8 @@ def get_articles_from_same_day_2(self):
FROM custom_methods_articles
WHERE pub_date = %s
AND id != %s""", [str(self.pub_date),])
+ # The asterisk in "Article(*row)" tells Python to expand the list into
+ # positional arguments to Article().
return [Article(*row) for row in cursor.fetchall()]
Please sign in to comment.
Something went wrong with that request. Please try again.