On Fri, Jan 17, 2014 at 12:32 AM, Pieter Hintjens <[email protected]> wrote:
> On Thu, Jan 16, 2014 at 9:01 PM, Michel Pelletier > <[email protected]> wrote: > > > Yes, pyczmq is very much a literal 1 to 1 wrapper around the czmq C > > interface. > > > > Note that there is also an "object oriented" interface: > > CZMQ was designed to allow an OO interface on top; it may not succeed > in all classes. Where it's possible I'd probably not expose the 1-1 > wrapper at all, and only provide the proper OO interface. (Less > confusing for users > > I grew up around chainsaws, lathe chisels and shotguns, so I respect and appreciate dangerous objects and find they often have great utility. CFFI is definitely a chainsaw and can cut through the protection mechanisms of the Python interpreter just as effectively. This is why pyczmq exposes 4 different layers, the raw libzmq wrapper, the raw czmq wrapper, a slightly less raw czmq wrapper, and a soft and gentle OO interface. I can see adding documentation telling users only to use the last interface if they don't know how to use the former ones. But I see no point in removing them. In fact you can't really "hide" anything in Python, except maybe in a closure and probably even then there's likely some CPython specific way to get at them. -Michel > -Pieter > _______________________________________________ > zeromq-dev mailing list > [email protected] > http://lists.zeromq.org/mailman/listinfo/zeromq-dev >
_______________________________________________ zeromq-dev mailing list [email protected] http://lists.zeromq.org/mailman/listinfo/zeromq-dev
