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

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


homepricemaps at gmail.com 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'
    'food'

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

</F>






More information about the Python-list mailing list