mirror of
				https://github.com/python/cpython.git
				synced 2025-10-31 18:28:49 +00:00 
			
		
		
		
	Issue #9343: Document that argparse parent parsers must be configured before their children. (Merge from 3.2.)
This commit is contained in:
		
						commit
						b04d70d993
					
				
					 2 changed files with 8 additions and 0 deletions
				
			
		|  | @ -351,6 +351,11 @@ Note that most parent parsers will specify ``add_help=False``.  Otherwise, the | ||||||
| :class:`ArgumentParser` will see two ``-h/--help`` options (one in the parent | :class:`ArgumentParser` will see two ``-h/--help`` options (one in the parent | ||||||
| and one in the child) and raise an error. | and one in the child) and raise an error. | ||||||
| 
 | 
 | ||||||
|  | .. note:: | ||||||
|  |    You must fully initialize the parsers before passing them via ``parents=``. | ||||||
|  |    If you change the parent parsers after the child parser, those changes will | ||||||
|  |    not be reflected in the child. | ||||||
|  | 
 | ||||||
| 
 | 
 | ||||||
| formatter_class | formatter_class | ||||||
| ^^^^^^^^^^^^^^^ | ^^^^^^^^^^^^^^^ | ||||||
|  |  | ||||||
|  | @ -304,6 +304,9 @@ Library | ||||||
| 
 | 
 | ||||||
| - Issue #8982: Improve the documentation for the argparse Namespace object. | - Issue #8982: Improve the documentation for the argparse Namespace object. | ||||||
| 
 | 
 | ||||||
|  | - Issue #9343: Document that argparse parent parsers must be configured before | ||||||
|  |   their children. | ||||||
|  | 
 | ||||||
| Build | Build | ||||||
| ----- | ----- | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Steven Bethard
						Steven Bethard