On 03Apr2013 12:12, Greg Ewing <greg.ew...@canterbury.ac.nz> wrote:
| Kristján Valur Jónsson wrote:
| >However, relative imports can _only_ be performed using the "from X import Y 
syntax"
| 
| This seems like a legitimate complaint on its own, [...]
| There are a couple of ways that this could be resolved. One
| would be to use the name resulting from stripping off the
| leading dots, so that
|    import .foo
| would bind the module to the name 'foo'.

+0 from me (I'd have been +0.5 but for Guido's explaination about
"import X" generally letting you use "X" exactly as phrased in the
import).

| Another would be
| to always require an 'as' clause in this case, so that you
| would have to write'
|    import .foo as foo

And a big +1 for this.

Cheers,
-- 
Cameron Simpson <c...@zip.com.au>

The Force. It surrounds us; It enfolds us; It gets us dates on Saturday
Nights. - Obi Wan Kenobi, Famous Jedi Knight and Party Animal.
_______________________________________________
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

Reply via email to