homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author juan.gonzalez
Recipients juan.gonzalez
Date 2011年07月04日.21:48:37
SpamBayes Score 3.643698e-08
Marked as misclassified No
Message-id <1309816118.48.0.732382168551.issue12492@psf.upfronthosting.co.za>
In-reply-to
Content
Something really weird going on in python find() string function. When I call <string>.find() and python returns -1 it crashes when compared against 0 using the ">" operator.
The statement in which crash condition occurs is the following:
 if url.find(str) > 0:
 print "RSS Item:", url
	break; 
However, if I change the statement to be "<" instead it does not crash.
The error that the python compiler reports is:
AttributeError: 'int' object has no attribute 'find'
My version of python is:
tony@ubuntu:~/auto/sel/scripts$ python -V
Python 2.7.1+
History
Date User Action Args
2011年07月04日 21:48:38juan.gonzalezsetrecipients: + juan.gonzalez
2011年07月04日 21:48:38juan.gonzalezsetmessageid: <1309816118.48.0.732382168551.issue12492@psf.upfronthosting.co.za>
2011年07月04日 21:48:37juan.gonzalezlinkissue12492 messages
2011年07月04日 21:48:37juan.gonzalezcreate

AltStyle によって変換されたページ (->オリジナル) /