mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	Issue #18031: %-formatting isn't dead yet and might pull through.
This commit is contained in:
		
							parent
							
								
									7f0882c920
								
							
						
					
					
						commit
						c1939b8f75
					
				
					 1 changed files with 0 additions and 4 deletions
				
			
		| 
						 | 
					@ -213,10 +213,6 @@ operation. For example::
 | 
				
			||||||
   >>> print('The value of PI is approximately %5.3f.' % math.pi)
 | 
					   >>> print('The value of PI is approximately %5.3f.' % math.pi)
 | 
				
			||||||
   The value of PI is approximately 3.142.
 | 
					   The value of PI is approximately 3.142.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Since :meth:`str.format` is quite new, a lot of Python code still uses the ``%``
 | 
					 | 
				
			||||||
operator. However, because this old style of formatting will eventually be
 | 
					 | 
				
			||||||
removed from the language, :meth:`str.format` should generally be used.
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
More information can be found in the :ref:`old-string-formatting` section.
 | 
					More information can be found in the :ref:`old-string-formatting` section.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue