Steven Bethard wrote: > And, as you mention, it's consistent with the relative import feature.
Greg Ewing wrote: > With imports, .foo is an abbreviation for myself.foo, > where myself is the absolute name for the current module, > and you could replace all instances of .foo with that. Phillip J. Eby wrote: > Actually, "import .foo" is an abbreviation for "import myparent.foo", not > "import myparent.myself.foo". If we wanted to be fully consistent with the relative import mechanism, we would require as many dots as nested scopes. So: def incrementer(val): def inc(): .val += 1 return .val return inc but also: def incrementer_getter(val): def incrementer(): def inc(): ..val += 1 return ..val return inc return incrementer (Yes, I know the example is silly. It's not meant as a use case, just to demonstrate the usage of dots.) I actually don't care which way it goes here, but if you want to make the semantics as close to the relative import semantics as possible, then this is the way to go. STeVe -- Grammar am for people who can't think for myself. --- Bucky Katt, Get Fuzzy _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com