[Twisted-Python] Allowing a type to be transmitted by jelly?

Mike C. Fletcher mcfletch at vrplumber.com
Thu Dec 22 11:35:48 EST 2005

Micky Latowicki wrote:

> From what I know, tuples jelly just fine. I think that what you're 
> serializing isn't a tuple, but rather a cinemon.snmp.oidobject.OID, or 
> something that contains a reference to that. Is that a tuple? if it 
> is, how is it defined?
cinemon.snmp.oidobject.OID and pysnmp.asn1.oid.OID are tuple sub-classes 
with __slots__ defined to () such that they have the internal layout of 
tuples.  That's done to improve the efficiency of PySNMP, TwistedSNMP 
and Cinemon, the classes just add new methods, no new data is stored in 
the instance's object structure.

Bald tuples do, indeed, transmit fine, but sub-classes do not.


  Mike C. Fletcher
  Designer, VR Plumber, Coder

More information about the Twisted-Python mailing list