Message96294
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. |
|
Date |
User |
Action |
Args |
2009-12-12 15:36:26 | r.david.murray | set | recipients:
+ r.david.murray, jgsack, ncoghlan, pitrou, michael.foord |
2009-12-12 15:36:26 | r.david.murray | set | messageid: <1260632186.25.0.555610737717.issue7396@psf.upfronthosting.co.za> |
2009-12-12 15:36:25 | r.david.murray | link | issue7396 messages |
2009-12-12 15:36:24 | r.david.murray | create | |
|