[zeromq-dev] pyczmq and ctx.set_linger()
Michel Pelletier
pelletier.michel at gmail.com
Fri Jan 17 17:22:09 CET 2014
On Fri, Jan 17, 2014 at 12:32 AM, Pieter Hintjens <ph at imatix.com> wrote:
> On Thu, Jan 16, 2014 at 9:01 PM, Michel Pelletier
> <pelletier.michel at gmail.com> 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
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.zeromq.org/pipermail/zeromq-dev/attachments/20140117/500b7efc/attachment.htm>
More information about the zeromq-dev
mailing list