On 5/27/08, Eric Jonas <[EMAIL PROTECTED]> wrote:
> To start with, this is awesome. Thank you so much!
>
>  Next question: What if I want MyPair to have a zero-argument
>  constructor? (Well, besides self, that is). If I do:
>
>  class MyPair(pair):
>    def __init__(self):
>        pass
>
>  then I get "TypeError: ('__init__() takes exactly 1 argument (3 given)".
>  Does this mean that derived types must always have constructors with the
>  same number (or more) than their base type?

Yes and No. The problem is that different pickle protocols assume and
do different things. Give me some minute, I'll try to figure out
what's going on. And yes, you are right, this is a real crap if you
want so support in a easy way all pickle protocols, plus class
inheritance.


-- 
Lisandro Dalcín
---------------
Centro Internacional de Métodos Computacionales en Ingeniería (CIMEC)
Instituto de Desarrollo Tecnológico para la Industria Química (INTEC)
Consejo Nacional de Investigaciones Científicas y Técnicas (CONICET)
PTLC - Güemes 3450, (3000) Santa Fe, Argentina
Tel/Fax: +54-(0)342-451.1594
_______________________________________________
Cython-dev mailing list
[email protected]
http://codespeak.net/mailman/listinfo/cython-dev

Reply via email to