[issue43202] Cleanup codeop._maybe_compile

2021-02-19 Thread Terry J. Reedy


Terry J. Reedy  added the comment:

Second patch: "Add comment, end others with period, remove unused variables, 
initialize others only when needed, and add explicit return."

--
resolution:  -> fixed
stage: patch review -> resolved
status: open -> closed

___
Python tracker 

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



[issue43202] Cleanup codeop._maybe_compile

2021-02-12 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset b676f5f809007533db3e3fdd01243959dd233d57 by Terry Jan Reedy in 
branch 'master':
bpo-43202: More codeop._maybe_compile clean-ups (GH-24512)
https://github.com/python/cpython/commit/b676f5f809007533db3e3fdd01243959dd233d57


--

___
Python tracker 

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



[issue43202] Cleanup codeop._maybe_compile

2021-02-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
pull_requests: +23298
pull_request: https://github.com/python/cpython/pull/24512

___
Python tracker 

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



[issue43202] Cleanup codeop._maybe_compile

2021-02-11 Thread Terry J. Reedy


Terry J. Reedy  added the comment:


New changeset 2068b261e95e9fe9c4041f0102c9e931692dd5aa by Terry Jan Reedy in 
branch 'master':
bpo-43202: Immediately return code object in codeop._maybe_compile (GH-24508)
https://github.com/python/cpython/commit/2068b261e95e9fe9c4041f0102c9e931692dd5aa


--

___
Python tracker 

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



[issue43202] Cleanup codeop._maybe_compile

2021-02-11 Thread Terry J. Reedy


Change by Terry J. Reedy :


--
keywords: +patch
pull_requests: +23296
stage: needs patch -> patch review
pull_request: https://github.com/python/cpython/pull/24508

___
Python tracker 

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



[issue43202] Cleanup codeop._maybe_compile

2021-02-11 Thread Terry J. Reedy


New submission from Terry J. Reedy :

Following-up on discussion in #43163 and PR-24483, this issue is limited to 
changes that are expected to not affect the return value.  Therefore, do not 
backport unless and until needed as part of a bugfix.

First is moving the code return to immediately after it is successfully 
created.  Everything done after is ignored and useless.  This move makes the 
function return sooner and renders initialization of 'code' unnecessary.

--
assignee: terry.reedy
components: Library (Lib)
messages: 386836
nosy: terry.reedy
priority: normal
severity: normal
stage: needs patch
status: open
title: Cleanup codeop._maybe_compile
type: enhancement
versions: Python 3.10

___
Python tracker 

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