[Python-Dev] issue5578 - explanation (original) (raw)
"Martin v. Löwis" martin at v.loewis.de
Sat Apr 4 04:07:34 CEST 2009
- Previous message: [Python-Dev] issue5578 - explanation
- Next message: [Python-Dev] Let's update CObject API so it is safe and regular!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Alexandre Vassalotti wrote:
On Tue, Mar 31, 2009 at 11:25 PM, Guido van Rossum <guido at python.org> wrote:
Well hold on for a minute, I remember we used to have an exec statement in a class body in the standard library, to define some file methods in socket.py IIRC. FYI, collections.namedtuple is also implemented using exec.
Ah, but it uses "exec ... in ...". That is much safer than an unqualified exec (where the issue is what namespace it executes in, and, consequentially, what early binding is possible).
The patch bans only unqualified exec, IIUC.
Regards, Martin
- Previous message: [Python-Dev] issue5578 - explanation
- Next message: [Python-Dev] Let's update CObject API so it is safe and regular!
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]