Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> Pad left? That's a two-line method at most.

The functionality comes from the prior string.format method, which has been around since Python 2.6 (first released in 2008).

https://docs.python.org/2.6/library/string.html#formatspec

> It's faster to do it yourself ad-hoc.

I have found the syntax to be quite mentally "sticky".

> the implementation is right there (and easy to customize!) not buried in the docs and immutable.

There are hooks to customize it.



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: