[Python-Dev] xmlrpclib.{True, False} (was Re: Assignment to None) (original) (raw)
Benjamin Peterson musiccomposition at gmail.com
Sun Jun 15 15:33:02 CEST 2008
- Previous message: [Python-Dev] xmlrpclib.{True, False} (was Re: Assignment to None)
- Next message: [Python-Dev] xmlrpclib.{True, False} (was Re: Assignment to None)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On Sun, Jun 15, 2008 at 8:11 AM, Thomas Lee <tom at vector-seven.com> wrote:
The simplest options I can think of to remedy this: 1. A setattr hack: setattr(import(name), "True", True) 2. Remove all optimization of Name("True") and Name("False") 3. Skip AST optimization entirely for the LHS of Assignment nodes (effectively removing any optimization of the "targets" tuple)
You're working on optimization for the 2.6 branch, correct? In that case, why don't we take option 3 in 2.x and just reenable it in 3.x where it's completely forbidden to assign to True or False?
I'm leaning towards #3 at the moment as it seems like it's going to be the cleanest approach and makes a lot of sense -- at least on the surface. Can anybody think of problems with this approach? Cheers, T
-- Cheers, Benjamin Peterson "There's no place like 127.0.0.1."
- Previous message: [Python-Dev] xmlrpclib.{True, False} (was Re: Assignment to None)
- Next message: [Python-Dev] xmlrpclib.{True, False} (was Re: Assignment to None)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]