R. David Murray <rdmur...@bitdance.com> added the comment:

It turns out that there is standard way to do this (well, a de-facto standard, 
anyway).  glibc (and apparently others) support 'modifiers', of which the '-' 
modifier will suppress 0 padding.  Furthermore, since we pass the format string 
through to glibc, Python *already* supports this on glibc based platforms, 
though it isn't documented:

  >>> t.strftime("%m")
  '03'
  >>> t.strftime("%-m")
  '3'

----------
resolution:  -> out of date
stage:  -> committed/rejected
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue14441>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to