Regarding the 'next' example: Yes, that code would crash, but that's not breaking *existing* code; you would have to add new code that used the next() built-in, and that would simply be a coding error. Existing applications that happen to use 'next' as a variable name should be OK.
Posted Sep 3, 2008 16:16 UTC (Wed) by MiguelAtWork (guest, #53380)
[Link]
I know, sorry I wasn't clear. The situation I was thinking of is one where you're updating an application written before 2.6 but you're unaware that the application redefines e.g. next. I don't think that's too far-fetched.
What's new in Python 2.6
Posted Sep 4, 2008 2:28 UTC (Thu) by jamesh (guest, #1159)
[Link]
Assuming that the code has been broken up into reasonable sized modules, this isn't usually that big a deal. You can tackle the "Python 2.6 cleanness" problem on a module by module basis. A global next variable/function in one module isn't going to shadow the builtin in other modules.