my own type in C, sequence protocol

Grant Edwards grante at visi.com
Thu Sep 9 18:00:26 EDT 2004


On 2004-09-09, Grant Edwards <grante at visi.com> wrote:

>> The type that i implemented is a "CAN message", don't know if
>> this means something to you, it is a communication message
>> with 0 to 8 bytes content.  To access this content i thought
>> there would be an advantage in implementing the sequence
>> protocol.  What is the advantage then?
>
> Good question.  
>
> [I just use lists of integers for my CAN messages.]
>
> If you want to iterate over your object, you probably want to
> support the sequence protocol.

Ignore that. I was conflating the sequence protocol and the
iterator protocol.

-- 
Grant Edwards                   grante             Yow!  VICARIOUSLY
                                  at               experience some reason
                               visi.com            to LIVE!!



More information about the Python-list mailing list