1. 16 May, 2016 1 kayıt (commit)
  2. 21 Haz, 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. 28 Eyl, 2011 1 kayıt (commit)
  5. 09 May, 2010 1 kayıt (commit)
  6. 22 Nis, 2009 1 kayıt (commit)
    • Eric Smith's avatar
      Backport of some of the work in r71665 to trunk. This reworks much of · aca19e6a
      Eric Smith yazdı
      int, long, and float __format__(), and it keeps their implementation
      in sync with py3k.
      
      Also added PyOS_double_to_string. This is the "fallback" version
      that's also available in trunk, and should be kept in sync with that
      code. I'll add an issue to document PyOS_double_to_string in the C
      API.
      
      There are many internal cleanups. Externally visible changes include:
      
      - Implement PEP 378, Format Specifier for Thousands Separator, for
        floats, ints, and longs.
      
      - Issue #5515: 'n' formatting for ints, longs, and floats handles
        leading zero formatting poorly.
      
      - Issue #5772: For float.__format__, don't add a trailing ".0" if
        we're using no type code and we have an exponent.
      aca19e6a
  7. 16 Nis, 2009 1 kayıt (commit)
    • Eric Smith's avatar
      The other half of Issue #1580: use short float repr where possible. · 0923d1d8
      Eric Smith yazdı
      Addresses the float -> string conversion, using David Gay's code which
      was added in Mark Dickinson's checkin r71663.
      
      Also addresses these, which are intertwined with the short repr
      changes:
      
      - Issue #5772: format(1e100, '<') produces '1e+100', not '1.0e+100'
      - Issue #5515: 'n' formatting with commas no longer works poorly
          with leading zeros.
      - PEP 378 Format Specifier for Thousands Separator: implemented
          for floats.
      0923d1d8
  8. 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
  9. 24 Haz, 2008 2 kayıt (commit)
  10. 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