On Thursday 29 June 2006 20:56, Nick Coghlan wrote: > Guido van Rossum wrote: > > On 6/28/06, Nick Coghlan <[EMAIL PROTECTED]> wrote: > >> The workaround to replace __name__ with __module_name__ 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 __module_name__ 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 > get_parent()).
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 <[EMAIL PROTECTED]> It's never too late to have a happy childhood. _______________________________________________ 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