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

Pieter Hintjens ph at imatix.com
Thu Jan 23 17:21:41 CET 2014

OK, I've made a pull request for this change, removing printf from the
API except where it's really obvious. It breaks CZMQ compatibility for
some apps, sadly. Better security, arguably worth it.

On Mon, Jan 20, 2014 at 9:22 PM, Greg Ward <greg at gerg.ca> wrote:
> 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
> --
> Greg Ward                            http://www.gerg.ca
> <greg at gerg.ca>                       @gergdotca
> _______________________________________________
> zeromq-dev mailing list
> zeromq-dev at lists.zeromq.org
> http://lists.zeromq.org/mailman/listinfo/zeromq-dev

More information about the zeromq-dev mailing list