1. 14 Nis, 2013 1 kayıt (commit)
  2. 10 May, 2012 1 kayıt (commit)
  3. 23 Şub, 2012 1 kayıt (commit)
    • Victor Stinner's avatar
      Issue #13706: Fix format(int, "n") for locale with non-ASCII thousands separator · 41a863cb
      Victor Stinner yazdı
       * Decode thousands separator and decimal point using PyUnicode_DecodeLocale()
         (from the locale encoding), instead of decoding them implicitly from latin1
       * Remove _PyUnicode_InsertThousandsGroupingLocale(), it was not used
       * Change _PyUnicode_InsertThousandsGrouping() API to return the maximum
         character if unicode is NULL
       * Replace MIN/MAX macros by Py_MIN/Py_MAX
       * stringlib/undef.h undefines STRINGLIB_IS_UNICODE
       * stringlib/localeutil.h only supports Unicode
      41a863cb
  4. 12 Ock, 2012 1 kayıt (commit)
  5. 20 Kas, 2011 1 kayıt (commit)
  6. 11 Eki, 2011 1 kayıt (commit)
  7. 28 Eyl, 2011 2 kayıt (commit)
  8. 13 Ock, 2010 2 kayıt (commit)
  9. 02 Ock, 2010 2 kayıt (commit)
  10. 30 Kas, 2009 1 kayıt (commit)
  11. 03 Nis, 2009 1 kayıt (commit)
    • Eric Smith's avatar
      Added ',' thousands grouping to int.__format__. See PEP 378. · a3b1ac8d
      Eric Smith yazdı
      This is incomplete, but I want to get some version into the next alpha. I am still working on:
      Documentation.
      More tests.
      Implement for floats.
      
      In addition, there's an existing bug with 'n' formatting that carries forward to thousands grouping (issue 5515).
      a3b1ac8d
  12. 11 Haz, 2008 1 kayıt (commit)
    • Georg Brandl's avatar
      #2630: Implement PEP 3138. · 559e5d7f
      Georg Brandl yazdı
      The repr() of a string now contains printable Unicode characters unescaped.
      The new ascii() builtin can be used to get a repr() with only ASCII characters in it.
      
      PEP and patch were written by Atsuo Ishimoto.
      559e5d7f
  13. 11 May, 2008 2 kayıt (commit)
    • Eric Smith's avatar
      Merged revisions 63078 via svnmerge from · 5807c415
      Eric Smith yazdı
      svn+ssh://pythondev@svn.python.org/python/trunk
      
      When forward porting this, I added _PyUnicode_InsertThousandsGrouping.
      
      ........
        r63078 | eric.smith | 2008-05-11 15:52:48 -0400 (Sun, 11 May 2008) | 14 lines
      
        Addresses issue 2802: 'n' formatting for integers.
      
        Adds 'n' as a format specifier for integers, to mirror the same
        specifier which is already available for floats.  'n' is the same as
        'd', but inserts the current locale-specific thousands grouping.
      
        I added this as a stringlib function, but it's only used by str type,
        not unicode.  This is because of an implementation detail in
        unicode.format(), which does its own str->unicode conversion.  But the
        unicode version will be needed in 3.0, and it may be needed by other
        code eventually in 2.6 (maybe decimal?), so I left it as a stringlib
        implementation.  As long as the unicode version isn't instantiated,
        there's no overhead for this.
      ........
      5807c415
    • Eric Smith's avatar
      Addresses issue 2802: 'n' formatting for integers. · cf537ff3
      Eric Smith yazdı
      Adds 'n' as a format specifier for integers, to mirror the same
      specifier which is already available for floats.  'n' is the same as
      'd', but inserts the current locale-specific thousands grouping.
      
      I added this as a stringlib function, but it's only used by str type,
      not unicode.  This is because of an implementation detail in
      unicode.format(), which does its own str->unicode conversion.  But the
      unicode version will be needed in 3.0, and it may be needed by other
      code eventually in 2.6 (maybe decimal?), so I left it as a stringlib
      implementation.  As long as the unicode version isn't instantiated,
      there's no overhead for this.
      cf537ff3
  14. 17 Şub, 2008 2 kayıt (commit)
    • Eric Smith's avatar
      Fixes for shared 2.6 code that implements PEP 3101, advanced string · 8fd3eba0
      Eric Smith yazdı
      formatting.
      
      Includes:
       - Modifying tests for basic types to use __format__ methods, instead
         of builtin "format".
       - Adding PyObject_Format.
       - General str/unicode cleanup discovered when backporting to 2.6.
       - Removing datetimemodule.c's time_format, since it was identical
         to date_format.
      
      The files in Objects/stringlib that implement PEP 3101 (stringdefs.h,
      unicodedefs.h, formatter.h, string_format.h) are identical in trunk
      and py3k.  Any changes from here on should be made to trunk, and
      changes will propogate to py3k).
      8fd3eba0
    • Eric Smith's avatar
      Backport of PEP 3101, Advanced String Formatting, from py3k. · a9f7d624
      Eric Smith yazdı
      Highlights:
       - Adding PyObject_Format.
       - Adding string.Format class.
       - Adding __format__ for str, unicode, int, long, float, datetime.
       - Adding builtin format.
       - Adding ''.format and u''.format.
       - str/unicode fixups for formatters.
      
      The files in Objects/stringlib that implement PEP 3101 (stringdefs.h,
      unicodedefs.h, formatter.h, string_format.h) are identical in trunk
      and py3k.  Any changes from here on should be made to trunk, and
      changes will propogate to py3k).
      a9f7d624
  15. 15 Kas, 2007 1 kayıt (commit)
  16. 16 Eki, 2007 1 kayıt (commit)
  17. 01 Eyl, 2007 1 kayıt (commit)
  18. 28 Agu, 2007 1 kayıt (commit)
  19. 25 Agu, 2007 1 kayıt (commit)
    • Eric Smith's avatar
      Implementation of PEP 3101, Advanced String Formatting. · 8c663263
      Eric Smith yazdı
      Known issues:
      
      The string.Formatter class, as discussed in the PEP, is incomplete.
      
      Error handling needs to conform to the PEP.
      
      Need to fix this warning that I introduced in Python/formatter_unicode.c:
      Objects/stringlib/unicodedefs.h:26: warning: `STRINGLIB_CMP' defined but not used
      
      Need to make sure sign formatting is correct, more tests needed.
      
      Need to remove '()' sign formatting, left over from an earlier version of the PEP.
      8c663263