my own type in C, sequence protocol

Torsten Mohr tmohr at s.netic.de
Thu Sep 9 21:03:44 CEST 2004


Hi,

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
this:

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
protocol?


Best regards,
Torsten.




More information about the Python-list mailing list