git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH] Makefile: Remove usage of deprecated Python "has_key" method

From
Tay Ray Chuan <rctay89@gmail.com>
Date
Mar 29, 2010, 00:23 UTC
Message-ID
<be6fef0d1003281723h4f8788bdi3c5baa3f92724c11@mail.gmail.com>
In-Reply-To
<20100328215442.GA31195@gmail.com>
Hi,
On Mon, Mar 29, 2010 at 5:54 AM, David Aguilar <davvid@gmail.com> wrote:
Show 14 quoted lines
> On Sun, Mar 28, 2010 at 09:38:54AM -0700, Junio C Hamano wrote:
>> David Aguilar <davvid@gmail.com> 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
Previous: David AguilarNext: Junio C Hamano
Message 4 of 6 in “Makefile: Remove usage of deprecated Python "has_key" method”
  1. Makefile: Remove usage of deprecated Python "has_key" methodDavid Aguilar, Mar 28, 2010
  2. Junio C HamanoMar 28, 2010
  3. David AguilarMar 28, 2010
  4. Tay Ray ChuanMar 29, 2010
  5. Junio C HamanoMar 29, 2010
  6. Johan HerlandMar 29, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.