From a4438d74f666e1f5b9e8e0c13463ec5e62a1e11f Mon Sep 17 00:00:00 2001 From: Adrian Holovaty Date: Mon, 1 Aug 2005 18:57:37 +0000 Subject: [PATCH] Changed custom_methods model test/doc to add explanation of what Article(*row) means, for Python beginners git-svn-id: http://code.djangoproject.com/svn/django/trunk@363 bcc190cf-cafb-0310-a4f2-bffc1f526a37 --- tests/testapp/models/custom_methods.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/testapp/models/custom_methods.py b/tests/testapp/models/custom_methods.py index 07b8e02e25e..9f19314991b 100644 --- a/tests/testapp/models/custom_methods.py +++ b/tests/testapp/models/custom_methods.py @@ -48,6 +48,8 @@ class Article(meta.Model): 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 = """