R. David Murray <rdmur...@bitdance.com> added the comment: Yes, rebinding a variable to a different type is something that is considered an acceptable pattern in Python programs, at least in certain circumstances. Python programs generally use 'duck typing', and a list and an iterable have equivalent semantics for the purposes of (most of) the regrtest code.
On the other hand, regrtest is in general *not* an example of good Python code, and really ought to be cleaned up at some point. In particular, the code blocks in regrtest are simply huge, and this makes changing it very error prone, with "what type is this variable" being just one example of the coupling problems. Attached is a patch against trunk. Please confirm that this fixes the problems you found. ---------- assignee: -> r.david.murray components: +Tests keywords: +patch stage: -> patch review versions: -Python 2.6, Python 3.1 Added file: http://bugs.python.org/file15532/regrtest_single_issue7396.patch _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue7396> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com