[Pythonmac-SIG] Can someone tell me why ('A',) isn't a
Just van Rossum
Mon, 24 Jul 2000 08:52:05 +0100
At 7:55 PM -0400 23-07-2000, James B. Wilkinson wrote:
>This doesn't have anything to do with the Mac, but you guys are the only
>Python folks I know.
>In what follows "handler" is bound to this method in another class.
> def do_char(self, ch, *rest): #ch must be a character
> # *rest is just for this debugging session
>Here's the end of the traceback:
> ok, t, s = apply(handler, ('A',))
>TypeError: unpack non-sequence
My first guess is that your handler doesn't _return_ a 3-tuple. The rest of
your story seems to confirm that, as you seem to get the above error in all
cases where the first element of your args tuple is a length 1 string,
which is the only proper arg for the ord() function, and the code looks ok.
So I think your conclusion is wrong...