On 3/24/06, Fredrik Lundh <[EMAIL PROTECTED]> wrote: > I'm well aware that Python 3000 doesn't aim to be backwards compatible, > but I would prefer if we could refrain from subtly changing the behaviour > of existing constructs in way that breaks all existing use, and makes it un- > necessarily hard to convert old code (whether by hand or by machine).
Agreed. I wonder what the plan is for the transition? Things like changing the semantics of the for-loop else-clause are actually relatively easy to flag since they can be spotted easily with the AST, and *all* current uses of the else-clause would be wrong. However, flagging things like "expects a list from dict.items instead of an iterator" might be harder to do. Some uses (for-loops, list-comps and genexps) are still perfectly fine while other uses (indexing, getting the len) aren't. I think most of these should raise an exception pretty quickly, but if any of them don't, that would make me pretty nervous when transitioning code. I wonder if it would be worth having a branch of python-3000 at some point that inserts warning code on all constructs that changed (e.g. all calls to dict.items). I have a suspicion that this would generate a lot of false-positives, but maybe it would still be worthwhile... STeVe -- Grammar am for people who can't think for myself. --- Bucky Katt, Get Fuzzy _______________________________________________ Python-3000 mailing list Python-3000@python.org http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com