'is not' or '!='
Steven D'Aprano
steve+comp.lang.python at pearwood.info
Wed Aug 20 07:05:42 EDT 2014
Rustom Mody wrote:
> It is interesting (and insidious) how technology shapes our thinking
> patterns. Before git,
Pardon me, but git did not invent revision control. There are dozens of
revision control software applications, including:
Mercurial: released April 2005
Git: released April 2005
GNU Bazaar: released March 2005
Subversion: 2000
Clearcase: 1992
CVS: 1990
Even venerable old cvs tracked authors.
> such tracking could be a headache. Things like
> git blame give an automated list 'blaming' each line on its
> perpetrator.
>
> Likewise when teaching (with) C it was immoral behaviour to not match
> malloc and free, file-open and close.
> Today the first is impossible and the second is unnecessary and wasteful
If you're talking about Python, in the second case you're mistaken. Although
it is not *compulsory* to close files in Python, since the garbage
collector will eventually do so for you, it is considered good practice to
do so. Generally it is considered best to use a `with open(...) as f`
block, and Python will automatically close the file as soon as the block is
left, but manually calling f.close() is still an option.
--
Steven
More information about the Python-list
mailing list