mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 21:51:50 +00:00 
			
		
		
		
	bpo-27772: Make preceding width with 0 valid in string format. (GH-11270)
Previously it was an error with confusing error message.
This commit is contained in:
		
							parent
							
								
									8dfe15625e
								
							
						
					
					
						commit
						cf19cc3b92
					
				
					 4 changed files with 15 additions and 3 deletions
				
			
		|  | @ -219,7 +219,7 @@ parse_internal_render_format_spec(PyObject *format_spec, | |||
|     /* The special case for 0-padding (backwards compat) */ | ||||
|     if (!fill_char_specified && end-pos >= 1 && READ_spec(pos) == '0') { | ||||
|         format->fill_char = '0'; | ||||
|         if (!align_specified) { | ||||
|         if (!align_specified && default_align == '>') { | ||||
|             format->align = '='; | ||||
|         } | ||||
|         ++pos; | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Serhiy Storchaka
						Serhiy Storchaka