maposmatic-dev
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Maposmatic-dev] [PATCH 4/4] Read the GIS database lag from a local


From: Maxime Petazzoni
Subject: Re: [Maposmatic-dev] [PATCH 4/4] Read the GIS database lag from a local file
Date: Thu, 19 Apr 2012 00:36:03 -0700
User-agent: Mutt/1.5.21 (2010-09-15)

* Thomas Petazzoni <address@hidden> [2012-04-19 09:09:00]:

> Le Thu, 19 Apr 2012 09:03:00 +0200,
> David MENTRE <address@hidden> a écrit :
> 
> > We should call f.close(), shouldn't we? Or, once again, I haven't
> > understood how Python works. :-)
> 
> Ah, correct.

Actually, it's more "Python-y" to use:

  with open(GIS_DATABASE_LAG_FILE) as f:
    # do stuff
  # f automatically closed when exiting the with block

/Max
-- 
Maxime Petazzoni <http://www.bulix.org>
 ``One by one, the penguins took away my sanity.''
Writing software in California

Attachment: signature.asc
Description: Digital signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]