[issue17718] boolop constant checking for if/while

2020-01-10 Thread Benjamin Peterson


Change by Benjamin Peterson :


--
resolution:  -> rejected
stage:  -> 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



[issue17718] boolop constant checking for if/while

2020-01-10 Thread Zackery Spytz


Zackery Spytz  added the comment:

I think this issue should be closed.

--
nosy: +ZackerySpytz

___
Python tracker 

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



[issue17718] boolop constant checking for if/while

2013-04-19 Thread Benjamin Peterson

Benjamin Peterson added the comment:

Thank you for the patch. However, I don't think such "optimizations" are 
particularly useful.

--

___
Python tracker 

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



[issue17718] boolop constant checking for if/while

2013-04-19 Thread Terry J. Reedy

Changes by Terry J. Reedy :


--
nosy: +benjamin.peterson, brett.cannon, georg.brandl, ncoghlan

___
Python tracker 

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



[issue17718] boolop constant checking for if/while

2013-04-13 Thread Ned Batchelder

Changes by Ned Batchelder :


--
nosy: +nedbat

___
Python tracker 

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



[issue17718] boolop constant checking for if/while

2013-04-13 Thread Stephen Tu

New submission from Stephen Tu:

Here's a simple patch to optimize away constant boolean 
conjunctions/disjunctions. for example:

def foo():
if 1 and 0:
print("hi")

now disassembles into:
  7   0 LOAD_CONST   0 (None) 
  3 RETURN_VALUE 

while I realize more general techniques for achieving this have been proposed 
(ie http://bugs.python.org/issue1346238), this is a very simple, self-contained 
patch.

--
components: Interpreter Core
files: constcheck.patch
keywords: patch
messages: 186767
nosy: Stephen.Tu
priority: normal
severity: normal
status: open
title: boolop constant checking for if/while
type: performance
versions: Python 3.4
Added file: http://bugs.python.org/file29807/constcheck.patch

___
Python tracker 

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