Code

Opened 8 years ago

Closed 8 years ago

Last modified 8 years ago

#2646 closed defect (fixed)

Spurious comma in Syndication/Atom1Feed Example Usage causes example code to fail.

Reported by: lec9@… Owned by: jacob
Component: Documentation Version:
Severity: normal Keywords:
Cc: Triage Stage: Unreviewed
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: UI/UX:

Description

On the page http://www.djangoproject.com/documentation/syndication/, in the "Example Usage" of an Atom1Feed, there's a spurious comma at the end of the block included below. This results in f being a tuple containing a reference to an Atom1Feed instance, when f should simply be a copy of that reference. (I'm a little bit new to Python, so apologies if I'm misusing the terminology)

>>> f = feedgenerator.Atom1Feed(
...     title=u"My Weblog",
...     link=u"http://www.example.com/",
...     description=u"In which I write about what I ate today.",
...     language=u"en"),

As such, the attempt to call "f.add_item(....)" fails. Solution: remove spurious comma.

Attachments (0)

Change History (1)

comment:1 Changed 8 years ago by adrian

  • Resolution set to fixed
  • Status changed from new to closed

(In [3721]) Fixed #2646 -- Removed unneeded comma in docs/syndication_feeds.txt. Thanks, lec9@…

Add Comment

Modify Ticket

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


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

 
Note: See TracTickets for help on using tickets.