Skip to content
Browse files

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

…cle(*row) means, for Python beginners

git-svn-id: http://code.djangoproject.com/svn/django/trunk@363 bcc190cf-cafb-0310-a4f2-bffc1f526a37
  • Loading branch information...
1 parent b307fb0 commit a4438d74f666e1f5b9e8e0c13463ec5e62a1e11f @adrianholovaty adrianholovaty committed
Showing with 2 additions and 0 deletions.
  1. +2 −0 tests/testapp/models/custom_methods.py
View
2 tests/testapp/models/custom_methods.py
@@ -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), self.id])
+ # The asterisk in "Article(*row)" tells Python to expand the list into
+ # positional arguments to Article().
return [Article(*row) for row in cursor.fetchall()]
API_TESTS = """

0 comments on commit a4438d7

Please sign in to comment.
Something went wrong with that request. Please try again.