Callable assertion?
Terry Reedy
tjreedy at udel.edu
Sun Oct 5 12:18:43 EDT 2003
More information about the Python-list mailing list
Sun Oct 5 12:18:43 EDT 2003
- Previous message (by thread): python cgi problem with method = post
- Next message (by thread): Callable assertion?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
"Roy Smith" <roy at panix.com> wrote in message news:roy-F9A420.08554505102003 at reader2.panix.com... > I've got a function which gets passed a call-back function as a > parameter. I want to check to make sure the thing passed in is indeed > callable. The acid test is to try calling it: try: param() except TypeError, msg: <do whatever> You can check that msg.endswith('not callable') if you want but I don't know the stability of the error message. Terry J. Reedy
- Previous message (by thread): python cgi problem with method = post
- Next message (by thread): Callable assertion?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list