Opened 4 years ago

Closed 4 years ago

Last modified 4 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: UI/UX:


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!

Attachments (0)

Change History (2)

comment:1 Changed 4 years ago by russellm

  • Needs documentation unset
  • Needs tests unset
  • Patch needs improvement unset
  • Resolution set to invalid
  • Status changed from new to closed

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 4 years ago by lukeplant

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.

Add Comment

Modify Ticket

Change Properties
<Author field>
as closed
as The resolution will be set. Next status will be 'closed'
The resolution will be deleted. Next status will be 'new'

E-mail address and user name can be saved in the Preferences.

Note: See TracTickets for help on using tickets.