By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
428,813 Members | 2,269 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 428,813 IT Pros & Developers. It's quick & easy.

Python interpreter error: unsupported operand type(s) for |:

P: n/a
hey folks i get this error: Python interpreter error: unsupported operand
type(s) for |:

when i run this line of code:

for incident in bs('tr', {'bgcolor' : '#eeeeee'} | {'bgcolor' :
'white'} ):

any idea what i'm doing wrong here?

thanks

yaffa

Aug 11 '05 #1
Share this Question
Share on Google+
3 Replies


P: n/a
you cannot use | with two dict (dict has no .__or__ method)

what are you trying to do?

Aug 11 '05 #2

P: n/a
Szabolcs Nagy a écrit :
you cannot use | with two dict (dict has no .__or__ method)

what are you trying to do?

read the post: "need help with python syntax"...
(posted one hour sooner)
Aug 11 '05 #3

P: n/a
yaffa a écrit :
hey folks i get this error: Python interpreter error: unsupported
operand type(s) for |:

when i run this line of code:

for incident in bs('tr', {'bgcolor' : '#eeeeee'} | {'bgcolor' :
'white'} ):

any idea what i'm doing wrong here?
yes: trying to do a bitwise or of two dict objects.

thanks


You're welcome.

Aug 11 '05 #4

This discussion thread is closed

Replies have been disabled for this discussion.