News for hackers. Stuff that matters.
Re:Improving your (Python) code with modern idioms by raverbashing on Tuesday May 08, 2012 @09:05AM (#3943388)
Printf format is great, but there's an issue

You're repeating yourself. Why? Because C can't know what types you are passing to it.

So you have to explicitly do '%d' or '%s' to let printf know what this is.

But yes, I think it's easier to type than {0}

Re:Improving your (Python) code with modern idioms by eru on Tuesday May 08, 2012 @12:01PM (#3944285)
In Python's old style you can use %s everywhere, and Python will figure out the types.