[zeromq-dev] Question about python binding generator

Arnaud Loonstra arnaud at sphaero.org
Fri Nov 6 15:52:54 CET 2015


Hi all,

I'm a bit puzzled. For example if I use czmq's zsock in Python I can 
retrieve the underlying socket using the resolve method. This method is 
defined as a static method in Python:

https://github.com/zeromq/czmq/blob/master/bindings/python/czmq.py#L2233

The way it is defined I need to call (zsock instance s)

s.resolve(s)

Or if really done right

Zsock.resolve(s)

But is this correct? It doesn't seem like a static method? In zsock.xml 
it is defined as being a singleton and polymorphic.

https://github.com/zeromq/czmq/blob/master/api/zsock.xml#L347

Can anybody shred a light here? Is this the correct approach or is the 
generator defining the method as static incorrectly?

Rg,

Arnaud



More information about the zeromq-dev mailing list