how to find not the next sibling but the 2nd sibling or findsibling "a" OR sinbling "b"

Fredrik Lundh fredrik at
Thu Jan 19 20:56:18 CET 2006

homepricemaps at wrote:

> ok i found something that works.  instead of using the def i did this:
> for incident in row('div', {'class': 'food' or 'drink' }):
> and it worked!

'food' or 'drink' doesn't do what you think it does:

    >>> 'food' or 'drink'

    >>> {'class': 'food' or 'drink'}
    {'class': 'food'}


More information about the Python-list mailing list