Unpacking extension (Re: A small inconsistency in syntax?)
Greg Ewing
greg at cosc.canterbury.ac.nz
Tue Oct 30 22:41:16 EST 2001
James_Althoff at i2.com wrote:
>
> Did you mean
>
> def __unpack__(self):
> return self.x, self.y
Yes, sorry.
> And is Pair(a,b) on the LHS any *callable*? Or must the object Pair be a
> type object or class object only?
It must be a type or class object.
--
Greg Ewing, Computer Science Dept, University of Canterbury,
Christchurch, New Zealand
To get my email address, please visit my web page:
http://www.cosc.canterbury.ac.nz/~greg
More information about the Python-list
mailing list