[issue12492] Inconsistent Python find() behavior

Juan Gonzalez report at bugs.python.org
Tue Jul 5 18:03:48 CEST 2011


Juan Gonzalez <juan.gonzalez at ti.com> added the comment:

Today I tried to use parse() instead of find() and I found out the following response:


tony at ubuntu:~/auto/sel/scripts$ python wtfibmdom
Traceback (most recent call last):
  File "wtfibmdom", line 22, in <module>
    if url.parse(str) > 0:
AttributeError: 'str' object has no attribute 'parse'
tony at ubuntu:~/auto/sel/scripts$ python wtfibmdom
Title: j3-dcsled-prd-validation passed Fri, 01 Jul 2011 14:03:59 -0500
Description: Build passed
Traceback (most recent call last):
  File "wtfibmdom", line 22, in <module>
    if url.find(str) > 0:
AttributeError: 'int' object has no attribute 'find'


I think this behavior is inconsistent since the compiler is treating the url variable as int and string at the same time.

----------
status: pending -> open

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12492>
_______________________________________


More information about the Python-bugs-list mailing list