"7stud" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] |I can't get the str() method to work in the following code(the last | line produces an error):
If you 'print str' here | methodList = [str for str in names if callable(getattr(obj, str))] and again here, you will see the problem; you have reassigned the name 'str' to something else by using it in the list comp. Hence the advice to never reuse builtin names unless you mean to lose access to the builtin object. |print str(getattr(obj, methodList[0]).__doc__) Here I presume you want the builtin function. Too bad... ;-) Terry Jan Reedy -- http://mail.python.org/mailman/listinfo/python-list