[New-bugs-announce] [issue13093] Redundant code in PyUnicode_EncodeDecimal()

Stefan Krah report at bugs.python.org
Sun Oct 2 17:39:15 CEST 2011

New submission from Stefan Krah <stefan-usenet at bytereef.org>:

I can't see what this code is supposed to accomplish (see patch):

  while (collend < end) {
      if ((0 < *collend && *collend < 256) ||
          !Py_UNICODE_ISSPACE(*collend) ||

Since 'collend' and 'end' don't change in the loop, it would be
infinite if the 'if' condition evaluated to false. But the 'if'
condition is always true.

components: Interpreter Core
files: encode_decimal_redundant_code.diff
keywords: needs review, patch
messages: 144774
nosy: skrah
priority: normal
severity: normal
stage: patch review
status: open
title: Redundant code in PyUnicode_EncodeDecimal()
type: behavior
versions: Python 3.3
Added file: http://bugs.python.org/file23295/encode_decimal_redundant_code.diff

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list