Message139810
| 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:38 | juan.gonzalez | set | recipients:
+ juan.gonzalez |
| 2011年07月04日 21:48:38 | juan.gonzalez | set | messageid: <1309816118.48.0.732382168551.issue12492@psf.upfronthosting.co.za> |
| 2011年07月04日 21:48:37 | juan.gonzalez | link | issue12492 messages |
| 2011年07月04日 21:48:37 | juan.gonzalez | create |
|