- 
          
 - 
                Notifications
    
You must be signed in to change notification settings  - Fork 33.3k
 
bpo-45995: add "z" format specifer to coerce negative 0 to zero #30049
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
          
     Merged
      
      
    
  
     Merged
                    Changes from all commits
      Commits
    
    
            Show all changes
          
          
            25 commits
          
        
        Select commit
          Hold shift + click to select a range
      
      a633e88
              
                bpo-45995: add "z" format specifer to coerce negative 0 to zero
              
              
                belm0 636da05
              
                formatting
              
              
                belm0 3f4085d
              
                implementation for Decimal
              
              
                belm0 68a049e
              
                📜🤖 Added by blurb_it.
              
              
                blurb-it[bot] ad32be5
              
                consistent flag names
              
              
                belm0 3dcaf5f
              
                add test case for integer value with z option
              
              
                belm0 6b9ab3b
              
                reference pending PEP
              
              
                belm0 e243568
              
                Apply some formatting and doc suggestions
              
              
                belm0 be4fda2
              
                revise "z" option description
              
              
                belm0 043d76a
              
                add test cases for explicit sign option
              
              
                belm0 104e023
              
                revise tests for format options expected to fail on floats
              
              
                belm0 61c64df
              
                "float presentation" -> "floating-point presentation"
              
              
                belm0 76d61ae
              
                news file terminating newline
              
              
                belm0 33fe72c
              
                add test coverage for Decimal bugs
              
              
                belm0 9393136
              
                Decimal: handle 'z' fill character correctly
              
              
                belm0 f88f7fc
              
                Decimal: const qualifier on fmt variable
              
              
                belm0 20c9cf1
              
                fix rounding of 'e', 'g', and '%' presentation types for Decimal
              
              
                belm0 bf1a891
              
                fix Decimal directed rounding
              
              
                belm0 3f5b392
              
                consistency among tests
              
              
                belm0 8d7a745
              
                fix stack-use-after-scope sanitizer error
              
              
                belm0 2a24e61
              
                clarify Decimal strategy
              
              
                belm0 0cbff6a
              
                fix Decimal format parsing
              
              
                belm0 8e7b51c
              
                fix Decimal when no precision is specified
              
              
                belm0 418ab76
              
                fix comment typo
              
              
                belm0 3ee6f6b
              
                add attribution to news blurb
              
              
                belm0 File filter
Filter by extension
Conversations
          Failed to load comments.   
        
        
          
      Loading
        
  Jump to
        
          Jump to file
        
      
      
          Failed to load files.   
        
        
          
      Loading
        
  Diff view
Diff view
There are no files selected for viewing
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              
        
          
          
            3 changes: 3 additions & 0 deletions
          
          3 
        
  Misc/NEWS.d/next/Library/2021-12-14-13-15-41.bpo-45995.Am9pNL.rst
  
  
      
      
   
        
      
      
    
  
    
      This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
      Learn more about bidirectional Unicode characters
    
  
  
    
              | Original file line number | Diff line number | Diff line change | 
|---|---|---|
| @@ -0,0 +1,3 @@ | ||
| Add a "z" option to the string formatting specification that coerces negative | ||
| zero floating-point values to positive zero after rounding to the format | ||
| precision. Contributed by John Belmonte. | 
      
      Oops, something went wrong.
        
    
  
  Add this suggestion to a batch that can be applied as a single commit.
  This suggestion is invalid because no changes were made to the code.
  Suggestions cannot be applied while the pull request is closed.
  Suggestions cannot be applied while viewing a subset of changes.
  Only one suggestion per line can be applied in a batch.
  Add this suggestion to a batch that can be applied as a single commit.
  Applying suggestions on deleted lines is not supported.
  You must change the existing code in this line in order to create a valid suggestion.
  Outdated suggestions cannot be applied.
  This suggestion has been applied or marked resolved.
  Suggestions cannot be applied from pending reviews.
  Suggestions cannot be applied on multi-line comments.
  Suggestions cannot be applied while the pull request is queued to merge.
  Suggestion cannot be applied right now. Please check back later.
  
    
  
    
Uh oh!
There was an error while loading. Please reload this page.