Re: how to test attribute existence of feedparser objects

2011-12-10 Thread Steven D'Aprano
On Sat, 10 Dec 2011 09:19:31 -0800, xDog Walker wrote: > Use standard Python dictionary functions such as has_key to test whether > an element exists. Idiomatic Python code today no longer uses has_key. # Was: d.feed.has_key('title') # Now preferred 'title' in d.feed -- Steven -- http://ma

Re: how to test attribute existence of feedparser objects

2011-12-10 Thread xDog Walker
On Thursday 2011 December 08 01:34, HansPeter wrote: > Hi, > > While using the feedparser library for downloading RSS feeds some of > the blog entries seem to have no title. > > File "build\bdist.win32\egg\feedparser.py", line 382, in __getattr__ > AttributeError: object has no attribute 'title' >

Re: how to test attribute existence of feedparser objects

2011-12-08 Thread Chris Rebert
On Thu, Dec 8, 2011 at 1:34 AM, HansPeter wrote: > Hi, > > While using the feedparser library for downloading RSS feeds some of > the blog entries seem to have no title. > >  File "build\bdist.win32\egg\feedparser.py", line 382, in __getattr__ > AttributeError: object has no attribute 'title' > >