[issue24053] Define EXIT_SUCCESS and EXIT_FAILURE constants in sys

2018-12-12 Thread Elliot Edmunds
Elliot Edmunds added the comment: I have personally come across situations where I am calling a Python script from a C program and would like to check the exit codes of the script, and have had to write sys.exit(1) and sys.exit(0) in Python, and compared them to EXIT_SUCCESS/EXIT_FAILURE

[issue16438] Numeric operator predecence confusing

2018-09-20 Thread Elliot Edmunds
Elliot Edmunds added the comment: I agree that linking to the precedence table is probably the best solution. A different option would be to add an extra column listing the "priority" and rank the priorities of the different operations. -- nosy: +Elli

[issue25433] whitespace in strip()/lstrip()/rstrip()

2018-08-28 Thread Elliot Edmunds
Elliot Edmunds added the comment: Not sure how helpful it would be to have the re.sub expressions for lstrip and rstrip, but I think it would look like: l_stripped = re.sub(r'^\s*', '', foo) r_stripped = re.sub(r'\s*$', '', foo) -- nosy: +Elliot Edmunds Added file: https