Ka-Ping Yee wrote: > Before it is reasonable to change the meaning of "global", we would > need to have coherent answers to these questions: > > 1. What is the global namespace?
Under the proposal, there is no such thing as "the" global namespace, so the question is meaningless. There's no such thing now, either -- there are just (multiple) module-level namespaces. > 2. Do global variables belong to the global namespace? Also meaningless as a corollary of 1. > 3. When it says "global x" does that mean x is a global variable? Yes, from the point of view of the scope containing the "global" declaration, it is. From the point of view of a different scope, it might not be. > Can you imagine trying to teach this? With a few well-chosen examples, yes. > either you have > to say (#1) there is no longer such a thing as "the global namespace", As I said, there isn't one now. Which namespace is "the global namespace" depends on which module you're looking from. Under the proposal, it would depend on which scope you're looking from. -- Greg _______________________________________________ Python-3000 mailing list [email protected] http://mail.python.org/mailman/listinfo/python-3000 Unsubscribe: http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com
