[zeromq-dev] Problems with pyczmq.zstr (was Re: pyczmq and ctx.set_linger())

Greg Ward greg at gerg.ca
Tue Jan 21 04:22:59 CET 2014

On 18 January 2014, Pieter Hintjens said:
> Yes, I thought it was cool to make a few of the string functions, like
> zstr_send, accept printf formats. I've also been bitten more than once
> by that.
> Perhaps we can consider this API style to be broken, and dangerous,
> and remove the printf formatting from zstr_send, putting it into
> zstr_sendf instead?
> There are a bunch of other cases like this. It'll break the CZMQ API
> but I think it's justified if we're fixing a design fault.

Agreed. It's a nice convenience for C programmers, but unnecessary and
risky for high-level bindings. E.g. the Python binding could just
ignore zstr_sendf() -- I imagine most Python programmers would reach
for Python's string-formatting facilities first.

Greg Ward                            http://www.gerg.ca
<greg at gerg.ca>                       @gergdotca

More information about the zeromq-dev mailing list