In python 2.6, a new standard string method was introduced:
format(). I have started using it a lot in my python code and it is the new standard way to format strings in python 3.0.
console.dir() for my conveniences. In order to make those conveniences even easier, I’ve added a format method that implements the simple replacement fields portion of python’s
Here it is:
It’s not perfect and it’s far from python’s full implementation, but it works 98% of the time I want to use something like this.