[Python-ideas] Before and after the colon in funciton defs.

Carl Matthew Johnson cmjohnson.mailinglist at gmail.com
Fri Sep 23 07:44:19 CEST 2011

On Sep 22, 2011, at 6:52 PM, Nick Coghlan wrote:

> No, locals simply don't work like that. They're handled by frame
> objects and the eval loop, not function objects.

I feel like I have the same complaint that other people did earlier in the thread: I understand that locals don't work like that *now*. (And they understood that decorators can't do an inject *now*.) When I said "locals" I was using a shorthand, because I don't know all the correct terminology. What I'm proposing is a change to how the system works. I want the byte code for functions to be created differently after this change.  Obviously, that can't be done by the function objects, but it will need to be done beforehand. There's probably much more to this sort of change than I realize--maybe even so much that it wouldn't be worth it to do it, since the benefit would be relatively small. If so, that's fine. But objecting that this isn't how it really works feels like it's missing the point to me. The more relevant objection is that it would be too huge of a project to make it work a different way.

With respect,

-- Carl 

More information about the Python-ideas mailing list