well actually all i want it to do is find the first thing that shows up whether its class:food or class: drink so that works for me. only thing is that after it finds class:food i think it runs through the html again and finds the following class:drink and being that there is not class tag after that class: drink tag it fails.
Fredrik Lundh wrote: > [EMAIL PROTECTED] 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> -- http://mail.python.org/mailman/listinfo/python-list