Django

Code

Ticket #2646 (closed: fixed)

Opened 2 years ago

Last modified 2 years ago

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

Reported by: lec9@leicester.ac.uk Assigned to: jacob
Milestone: Component: Documentation
Version: Keywords:
Cc: Triage Stage: Unreviewed
Has patch: 0 Needs documentation: 0
Needs tests: 0 Patch needs improvement: 0

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

Change History

09/04/06 19:20:53 changed by adrian

  • status changed from new to closed.
  • resolution set to fixed.

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


Add/Change #2646 (Spurious comma in Syndication/Atom1Feed Example Usage causes example code to fail.)




Change Properties
Action