From: Andrew M. Kuchling Date: Mon, 22 Feb 2010 14:55:17 +0000 (+0000) Subject: Merged revisions 78303 via svnmerge from X-Git-Tag: v2.6.5rc1~52 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=2f7b50a0db68f74ce81e0211cb728221f3b91696;p=python Merged revisions 78303 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r78303 | andrew.kuchling | 2010-02-22 09:53:17 -0500 (Mon, 22 Feb 2010) | 1 line #7794: describe 2.6 support for executing directories and zip archives ........ --- diff --git a/Doc/whatsnew/2.6.rst b/Doc/whatsnew/2.6.rst index c6f7c2da47..1c517c02ad 100644 --- a/Doc/whatsnew/2.6.rst +++ b/Doc/whatsnew/2.6.rst @@ -1481,6 +1481,13 @@ Other Language Changes Some smaller changes made to the core Python language are: +* Directories and zip archives containing a :file:`__main__.py` file + can now be executed directly by passing their name to the + interpreter. The directory or zip archive is automatically inserted + as the first entry in sys.path. (Suggestion and initial patch by + Andy Chu, subsequently revised by Phillip J. Eby and Nick Coghlan; + :issue:`1739468`.) + * The :func:`hasattr` function was catching and ignoring all errors, under the assumption that they meant a :meth:`__getattr__` method was failing somehow and the return value of :func:`hasattr` would