Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#14194 closed (invalid)

MIssing comma in tutorial code

Reported by: GarryFre Owned by: nobody
Component: Uncategorized Version: 1.2
Severity: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no


In the section about adding the poll app to the installed_apps array, there is a missing ending comma as shown below. The other variables show hanging commas so I assume this comma should be there and it did not complain about it. I am certain this would cause confusion and uncertainty for complete python/DJango newbies which the article is meant for.

    'mysite.polls' <-- Missing Comma!

Change History (2)

comment:1 Changed 8 years ago by Russell Keith-Magee

Resolution: invalid
Status: newclosed

There isn't a missing comma. The comma after the last element in a tuple is optional, unless the tuple has a single item. Both (a,b,c) and (a,b,c,) are legal.

comment:2 Changed 8 years ago by Luke Plant

Just to add to what Russell said: although the tutorial is meant for Django newbies, it isn't targeted primarily at Python newbies. We are not going to stop to explain anything which is straightforward Python syntax, since that is best done elsewhere.

Note: See TracTickets for help on using tickets.
Back to Top