prilisa...@googlemail.com wrote:

> Thanks to all your answers, I have read a lot about namespaces, but still
> there's something I do not understood. I have tried your example but as I
> expected:
> 
> line 13, in HandoverSQLCursor
>     curs.execute("SELECT * FROM lager")
> AttributeError: 'builtin_function_or_method' object has no attribute
> 'execute'

You have assigned a built-in function to the curs variable. Example:

>>> curs = open
>>> curs.execute
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
AttributeError: 'builtin_function_or_method' object has no attribute 
'execute'

You can find out the name of the actual function with

>>> print curs.__name__
open

PS: This question is only loosely related to your previous question. You 
should have started a new thread.




-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to