From: Tay Ray Chuan Date: Mon, 29 Mar 2010 00:23:41 GMT Subject: Re: [PATCH] Makefile: Remove usage of deprecated Python "has_key" method Message-ID: In-Reply-To: <20100328215442.GA31195@gmail.com> Hi, On Mon, Mar 29, 2010 at 5:54 AM, David Aguilar wrote: > On Sun, Mar 28, 2010 at 09:38:54AM -0700, Junio C Hamano wrote: >> David Aguilar writes: >> >> > "has_key" is a deprecated dictionary method in Python 2.6+. >> > Simplify the sys.path manipulation for installed scripts by >> > passing a default value to os.getenv(). >> >> It looks like the old code was replacing sys.path[0] but you are >> prepending this.  Doesn't that change also make a difference? > > The original code replaced sys.path[0] which is '' > (aka the current directory).  It's a little odd to > rely on the 0th element being something that is safe > to remove. more accurately, it's "directory containing the script that was used to invoke the Python interpreter": http://docs.python.org/library/sys.html#sys.path -- Cheers, Ray Chuan