Forums
New posts
Search forums
Members
Current visitors
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Menu
Log in
Register
Install the app
Install
Forums
Archive
Archive
Python
Oh what a twisted thread we weave....
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
[QUOTE="Tom Anderson, post: 1845559"] This code - i do not think it means what you think it means. Specifically, it doesn't mean "is either of ST_zeroMatch or ST_zeroMatch2 in self.webpg"; what it means is "apply the 'or' opereator to ST_zeroMatch and ST_zeroMatch2, then check if the result is in self.webpg". The result of applying the or operator to two nonempty strings is the left-hand string; your code is thus equivalent to if ST_zeroMatch in self.webpg: Which will work in cases where your page says 'You found 0 products', but not in cases where it says 'There are no products matching your selection'. What you want is: if (ST_zeroMatch in self.webpg) or (ST_zeroMatch2 in self.webpg): Or something like that. You say that you have a single-threaded version of this that works; presumably, you have a working version of this logic in there. Did you write the threaded version from scratch? Often a bad move! tom [/QUOTE]
Verification
Post reply
Forums
Archive
Archive
Python
Oh what a twisted thread we weave....
Top