[issue37908] Add some examples of ArgumentParser.exit()

2019-08-24 Thread hai shi


hai shi  added the comment:

Adding an example of ArgumentParser.exit(), because some user would like 
cathing errors manually or consider exit progress or not when an error occurs.

I have not add example of ArgumentParser.error(), because i can not think some 
user scenarios:(

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37908] Add some examples of ArgumentParser.exit()

2019-08-24 Thread hai shi


Change by hai shi :


--
keywords: +patch
pull_requests: +15150
stage:  -> patch review
pull_request: https://github.com/python/cpython/pull/15455

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37908] Add some examples of ArgumentParser.exit()

2019-08-21 Thread hai shi


Change by hai shi :


--
nosy: +paul.j3

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37908] Add some examples of ArgumentParser.exit()

2019-08-21 Thread hai shi


hai shi  added the comment:

issue 9938

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue37908] Add some examples of ArgumentParser.exit()

2019-08-21 Thread hai shi


New submission from hai shi :

As paul said in bpo 9938:
The exit and error methods are mentioned in the 3.4 documentation, but there 
are no examples of modifying them.

16.4.5.9. Exiting methods
ArgumentParser.exit(status=0, message=None)
ArgumentParser.error(message)

I will update the examples in this weekend.

--
assignee: docs@python
components: Documentation
messages: 350097
nosy: docs@python, shihai1991
priority: normal
severity: normal
status: open
title: Add some examples of ArgumentParser.exit()

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com