my own type in C, sequence protocol

Torsten Mohr tmohr at
Thu Sep 9 21:03:44 CEST 2004


i created a new type and implemented the sequence protocol
for it, or to be more precise the functions to get the
sequence length, to read a value and to assign a value
to an item.

Now i thought i could assign values to my type like

m = myType();
m = [ 1, 2, 3];

I have to admit that i'm not really experienced in python.

Now that i have implemented the sequence protocol, what
can i do with it, can't i assign values like above somehow?

Do i need to implement more functions for the sequence

Best regards,

More information about the Python-list mailing list