[Python-Dev] PEP 328 and PEP 338, redux (original) (raw)

Anthony Baxter anthony at interlink.com.au
Thu Jun 29 16:39:44 CEST 2006


On Thursday 29 June 2006 20:56, Nick Coghlan wrote:

Guido van Rossum wrote: > On 6/28/06, Nick Coghlan <ncoghlan at gmail.com> wrote: >> The workaround to replace name with modulename in order >> to enable >> relative imports turned out to be pretty ugly, so I also worked >> up a patch to >> import.c to get it to treat modulename as an override for >> name when >> name == 'main'. > > Ah, clever. +1.

In that case, I'll check it straight in. It was actually surprisingly easy to do, given how finicky import.c can get (this particular change was able to be handled entirely inside getparent()).

Please, please DON'T.

At this point in the release cycle, making a change like this without review (particularly to something as diabolically hairy as import.c) is going to make me unbelievably cranky. I'll try to make time to review the patch you posted tomorrow.

Anthony

-- Anthony Baxter <anthony at interlink.com.au> It's never too late to have a happy childhood.



More information about the Python-Dev mailing list