summaryrefslogtreecommitdiffstats
path: root/Lib/filecmp.py
Commit message (Collapse)AuthorAgeFilesLines
* Use PEP 8 and true booleans.Georg Brandl2009-05-171-6/+6
|
* Merged revisions ↵Benjamin Peterson2009-03-211-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 70342,70385-70387,70389-70390,70392-70393,70395,70400,70405-70406,70418,70438,70464,70468 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r70342 | georg.brandl | 2009-03-13 14:03:58 -0500 (Fri, 13 Mar 2009) | 1 line #5486: typos. ........ r70385 | benjamin.peterson | 2009-03-15 09:38:55 -0500 (Sun, 15 Mar 2009) | 1 line fix tuple.index() error message #5495 ........ r70386 | georg.brandl | 2009-03-15 16:32:06 -0500 (Sun, 15 Mar 2009) | 1 line #5496: fix docstring of lookup(). ........ r70387 | georg.brandl | 2009-03-15 16:37:16 -0500 (Sun, 15 Mar 2009) | 1 line #5493: clarify __nonzero__ docs. ........ r70389 | georg.brandl | 2009-03-15 16:43:38 -0500 (Sun, 15 Mar 2009) | 1 line Fix a small nit in the error message if bool() falls back on __len__ and it returns the wrong type: it would tell the user that __nonzero__ should return bool or int. ........ r70390 | georg.brandl | 2009-03-15 16:44:43 -0500 (Sun, 15 Mar 2009) | 1 line #5491: clarify nested() semantics. ........ r70392 | georg.brandl | 2009-03-15 16:46:00 -0500 (Sun, 15 Mar 2009) | 1 line #5488: add missing struct member. ........ r70393 | georg.brandl | 2009-03-15 16:47:42 -0500 (Sun, 15 Mar 2009) | 1 line #5478: fix copy-paste oversight in function signature. ........ r70395 | georg.brandl | 2009-03-15 16:51:48 -0500 (Sun, 15 Mar 2009) | 1 line #5276: document IDLESTARTUP and .Idle.py. ........ r70400 | georg.brandl | 2009-03-15 16:59:37 -0500 (Sun, 15 Mar 2009) | 3 lines Fix markup in re docs and give a mail address in regex howto, so that the recommendation to send suggestions to the author can be followed. ........ r70405 | georg.brandl | 2009-03-15 17:11:07 -0500 (Sun, 15 Mar 2009) | 7 lines Move the previously local import of threading to module level. This is cleaner and avoids lockups in obscure cases where a Queue is instantiated while the import lock is already held by another thread. OKed by Tim Peters. ........ r70406 | hirokazu.yamamoto | 2009-03-15 17:43:14 -0500 (Sun, 15 Mar 2009) | 1 line Added skip for old MSVC. ........ r70418 | georg.brandl | 2009-03-16 14:42:03 -0500 (Mon, 16 Mar 2009) | 1 line Add token markup. ........ r70438 | benjamin.peterson | 2009-03-17 15:29:51 -0500 (Tue, 17 Mar 2009) | 1 line I thought this was begging for an example ........ r70464 | benjamin.peterson | 2009-03-18 15:58:09 -0500 (Wed, 18 Mar 2009) | 1 line a much better example ........ r70468 | benjamin.peterson | 2009-03-18 22:04:31 -0500 (Wed, 18 Mar 2009) | 1 line close files after comparing them ........
* Merged revisions 65787 via svnmerge fromBrett Cannon2008-08-171-1/+0
| | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r65787 | brett.cannon | 2008-08-17 15:10:11 -0700 (Sun, 17 Aug 2008) | 3 lines Remove imports of 'warnings' that are no longer needed in dummy_thread, filecmp, and shelve. ........
* Move itertools izip() code to builtins as zip(). Complete the renaming.Raymond Hettinger2008-03-131-3/+3
|
* Rename ifilterfalse() to filterfalse() and izip_longest() to zip_longest().Raymond Hettinger2008-03-131-4/+4
|
* Issues 2186 and 2187. Move map() from itertools to builtins.Raymond Hettinger2008-03-131-3/+3
|
* Issue 2186 and 2187. Move filter from itertools to builtins.Raymond Hettinger2008-03-131-2/+2
|
* Fix more exception slicing.Georg Brandl2008-01-061-2/+2
|
* Raise statement normalization in Lib/.Collin Winter2007-08-301-1/+1
|
* Merged revisions 56125-56153 via svnmerge fromGuido van Rossum2007-07-031-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/p3yk ........ r56127 | georg.brandl | 2007-06-30 09:32:49 +0200 (Sat, 30 Jun 2007) | 2 lines Fix a place where floor division would be in order. ........ r56135 | guido.van.rossum | 2007-07-01 06:13:54 +0200 (Sun, 01 Jul 2007) | 28 lines Make map() and filter() identical to itertools.imap() and .ifilter(), respectively. I fixed two bootstrap issues, due to the dynamic import of itertools: 1. Starting python requires that map() and filter() are not used until site.py has added build/lib.<arch> to sys.path. 2. Building python requires that setup.py and distutils and everything they use is free of map() and filter() calls. Beyond this, I only fixed the tests in test_builtin.py. Others, please help fixing the remaining tests that are now broken! The fixes are usually simple: a. map(None, X) -> list(X) b. map(F, X) -> list(map(F, X)) c. map(lambda x: F(x), X) -> [F(x) for x in X] d. filter(F, X) -> list(filter(F, X)) e. filter(lambda x: P(x), X) -> [x for x in X if P(x)] Someone, please also contribute a fixer for 2to3 to do this. It can leave map()/filter() calls alone that are already inside a list() or sorted() call or for-loop. Only in rare cases have I seen code that depends on map() of lists of different lengths going to the end of the longest, or on filter() of a string or tuple returning an object of the same type; these will need more thought to fix. ........ r56136 | guido.van.rossum | 2007-07-01 06:22:01 +0200 (Sun, 01 Jul 2007) | 3 lines Make it so that test_decimal fails instead of hangs, to help automated test runners. ........ r56139 | georg.brandl | 2007-07-01 18:20:58 +0200 (Sun, 01 Jul 2007) | 2 lines Fix a few test cases after the map->imap change. ........ r56142 | neal.norwitz | 2007-07-02 06:38:12 +0200 (Mon, 02 Jul 2007) | 1 line Get a bunch more tests passing after converting map/filter to return iterators. ........ r56147 | guido.van.rossum | 2007-07-02 15:32:02 +0200 (Mon, 02 Jul 2007) | 4 lines Fix the remaining failing unit tests (at least on OSX). Also tweaked urllib2 so it doesn't raise socket.gaierror when all network interfaces are turned off. ........
* - PEP 3106: dict.iterkeys(), .iteritems(), .itervalues() are now gone;Guido van Rossum2007-02-111-3/+3
| | | | | | | | | | and .keys(), .items(), .values() return dict views. The dict views aren't fully functional yet; in particular, they can't be compared to sets yet. but they are useful as "iterator wells". There are still 27 failing unit tests; I expect that many of these have fairly trivial fixes, but there are so many, I could use help.
* Fix most trivially-findable print statements.Guido van Rossum2007-02-091-10/+10
| | | | | | | | | There's one major and one minor category still unfixed: doctests are the major category (and I hope to be able to augment the refactoring tool to refactor bona fide doctests soon); other code generating print statements in strings is the minor category. (Oh, and I don't know if the compiler package works.)
* SF patch 1631942 by Collin Winter:Guido van Rossum2007-01-101-2/+2
| | | | | | (a) "except E, V" -> "except E as V" (b) V is now limited to a simple name (local variable) (c) V is now deleted at the end of the except block
* Only three failing tests left: dbm, gdbm, tcl!Guido van Rossum2006-08-191-3/+3
|
* Removed deprecated use_statcache argument.Raymond Hettinger2004-12-051-11/+2
|
* SF bug #453515: filecmp.dircmp case sensitivity bugRaymond Hettinger2003-09-021-6/+6
|
* Module review:Raymond Hettinger2003-02-271-47/+22
| | | | | | | | | | * Changed variable name from 'list' to 'flist'. * Replaced "while 1" with "while True". * Replaced if/elif/elif/elif structure with a shorter and faster dispatch dictionary that maps attrs to methods. * Simplified and sped comparison logic by using ifilter, ifilterfalse, and dict.fromkeys. * Used True and False rather than 1 and 0.
* Add DeprecationWarning when use_statcache argument is suppliedAndrew M. Kuchling2003-02-061-4/+12
| | | | Fix use of GetoptError, so demo() now works
* [Bug #680494] filecmp.py uses obsolete statcache module.Andrew M. Kuchling2003-02-061-17/+9
| | | | | | | Simply replace all uses of statcache with os.stat. Should I add a DeprecationWarning triggered if the use_statcache argument is supplied, so we can remove it in 2.4?
* Replaced .keys() with dictionary iteratorsRaymond Hettinger2002-06-021-6/+6
|
* Replaced obsolete stat module constants with equivalent attributesRaymond Hettinger2002-06-011-5/+5
|
* Convert a pile of obvious "yes/no" functions to return bool.Tim Peters2002-04-041-4/+4
|
* more __all__ updatesSkip Montanaro2001-01-201-0/+2
|
* Whitespace normalization.Tim Peters2001-01-141-3/+3
|
* Update the code to better reflect recommended style:Fred Drake2000-12-121-2/+3
| | | | | Use != instead of <> since <> is documented as "obsolescent". Use "is" and "is not" when comparing with None or type objects.
* Call of _cmp had wrong number of paramereters.Moshe Zadka2000-12-031-2/+2
| | | | Fixed definition of _cmp.
* cmpfiles(): Added shallow and use_statcache parameters, with same meaningsFred Drake2000-07-031-14/+13
| | | | | | and defaults as for filecmp.cmp(). Updated docstring accordingly, and formatted it more like others in the standard library.
* Whoops! We just discovered that Gordon's revamp of this module wasGuido van Rossum2000-06-291-49/+310
| | | | | | | | accidentally wiped out by Ping's patch (which shouldn't have affected this file at all, had Ping done a cvs update). This checkin restores Gordon's version, with Fredrik's change merged back in.
* Fredrik Lundh:Guido van Rossum2000-03-281-10/+21
| | | | | | | | | | The new filecmp module has an optional argument called use_statcache which is documented as a true/false value, but used as an tuple index. This patches replaces the tuple stuff with a good old if- statement, and also removes a few other tuple pack/unpack constructs (if not else, this saves a few bytes in the PYC file, and a few microseconds when using the module ;-).
* More trivial comment -> docstring transformations by Ka-Ping Yee,Guido van Rossum2000-02-041-299/+38
| | | | | | | | | | | | | | | | | | who writes: Here is batch 2, as a big collection of CVS context diffs. Along with moving comments into docstrings, i've added a couple of missing docstrings and attempted to make sure more module docstrings begin with a one-line summary. I did not add docstrings to the methods in profile.py for fear of upsetting any careful optimizations there, though i did move class documentation into class docstrings. The convention i'm using is to leave credits/version/copyright type of stuff in # comments, and move the rest of the descriptive stuff about module usage into module docstrings. Hope this is okay.
* # module filecmpGuido van Rossum2000-02-031-38/+299
| | | | | | | | | | | | | | | # combo of old cmp, cmpcache and dircmp with redundancies removed # # bugs fixed: # dircmp.dircmp was not ignoring IGNORES # old stuff could falsely report files as "identical" when contents actually differed # # enhancements: # dircmp has a more straightforward interface #cmp enhanced by Moshe Zadca #dircmp enhanced byGordon McMillan [some layout changes by GvR]
* New module by Moshe Zadka (submitted on Sept. 25). This unifies theGuido van Rossum1999-10-261-0/+57
functionality of cmp.py and cmpcache.py, which are hereby declared obsolescent.