mirror of
				https://github.com/python/cpython.git
				synced 2025-11-03 19:34:08 +00:00 
			
		
		
		
	whatsnew: afic.open supports 'with'.
This commit is contained in:
		
							parent
							
								
									1cb4f607d1
								
							
						
					
					
						commit
						d592bb2dc4
					
				
					 2 changed files with 7 additions and 2 deletions
				
			
		| 
						 | 
					@ -54,8 +54,8 @@ Module :mod:`aifc` defines the following function:
 | 
				
			||||||
   The :func:`.open` function may be used in a :keyword:`with` statement.  When
 | 
					   The :func:`.open` function may be used in a :keyword:`with` statement.  When
 | 
				
			||||||
   the :keyword:`with` block completes, the :meth:`~aifc.close` method is called.
 | 
					   the :keyword:`with` block completes, the :meth:`~aifc.close` method is called.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
.. versionchanged:: 3.4
 | 
					   .. versionchanged:: 3.4
 | 
				
			||||||
   Support for the :keyword:`with` statement was added.
 | 
					      Support for the :keyword:`with` statement was added.
 | 
				
			||||||
 | 
					
 | 
				
			||||||
Objects returned by :func:`.open` when a file is opened for reading have the
 | 
					Objects returned by :func:`.open` when a file is opened for reading have the
 | 
				
			||||||
following methods:
 | 
					following methods:
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
| 
						 | 
					@ -494,6 +494,11 @@ aifc
 | 
				
			||||||
The :meth:`~aifc.getparams` method now returns a namedtuple rather than a
 | 
					The :meth:`~aifc.getparams` method now returns a namedtuple rather than a
 | 
				
			||||||
plain tuple.  (Contributed by Claudiu Popa in :issue:`17818`.)
 | 
					plain tuple.  (Contributed by Claudiu Popa in :issue:`17818`.)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					:func:`aifc.open` now supports the context manager protocol: when used in a
 | 
				
			||||||
 | 
					:keyword:`with` block, the :meth:`~aifc.aifc.close` method of the returned
 | 
				
			||||||
 | 
					object will be called automatically at the end of the block.  (Contributed by
 | 
				
			||||||
 | 
					Serhiy Storchacha in :issue:`16486`.)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
argparse
 | 
					argparse
 | 
				
			||||||
--------
 | 
					--------
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue