Commit Graph

82 Commits

Author SHA1 Message Date
Raymond Hettinger e66036063b Issue #11089: Fix performance issue limiting the use of ConfigParser()
with large config files.
2011-02-21 19:38:53 +00:00
Raymond Hettinger ff72816b5f Supply a reduce method for pickling. 2011-01-03 02:44:14 +00:00
Raymond Hettinger 00d43fd056 Fix doctest to not rely on order of dictionary entries.
Use super() instead of direct references to the dict superclass.
2011-01-02 08:03:33 +00:00
Raymond Hettinger 345c49b16b Fix OrderedDic.pop() to work for subclasses that define __missing__(). 2011-01-01 23:51:55 +00:00
Raymond Hettinger 32062e9be7 Make it easier to extend OrderedDict without breaking it. 2011-01-01 22:38:00 +00:00
Raymond Hettinger a673b1fd0e Fix OrderedDict.setdefault() to work for subclasses that define __missing__(). 2010-12-31 23:16:17 +00:00
Raymond Hettinger 96f3410ebe Issue 10667: Fast path for collections.Counter 2010-12-15 16:30:37 +00:00
Raymond Hettinger 35c87f2b8e Issue 9865: add __sizeof__ to OrderedDict. 2010-09-16 19:10:17 +00:00
Raymond Hettinger c1cc0d08d4 Remove unneeded exception chaining. 2010-09-16 08:06:05 +00:00
Raymond Hettinger f7328d026b Improve iteration speed by only proxying back links.
The forward links are hard references.
The sentinel element is also a weakref proxy
(to break a forward cylce wrapping around the sentinel).
2010-09-14 19:40:15 +00:00
Raymond Hettinger 98a5f3f838 Issue 9840: Add reprlib.recursive_repr(), a decorator for handling recursive calls to __repr__ methods. 2010-09-13 21:36:00 +00:00
Raymond Hettinger f1725296cc Put tests in more logical order. 2010-09-12 18:16:01 +00:00
Raymond Hettinger c5c29c0ac0 Use weakrefs for both forward and backward links. 2010-09-12 18:13:46 +00:00
Raymond Hettinger dc08a143e0 Issue #9826: Handle recursive repr in collections.OrderedDict. 2010-09-12 05:15:22 +00:00
Raymond Hettinger fa11db0a02 Issue #9825: Replace OrderedDict.__del__() with weakrefs. 2010-09-12 04:12:42 +00:00
Raymond Hettinger bd88802c1f Revert r84700 which had an unfortunate performance cost. 2010-09-11 08:07:42 +00:00
Raymond Hettinger 22b46e0ba9 Separate positional arguments from localized globals. 2010-09-11 00:05:44 +00:00
Raymond Hettinger f45abc97bf Add method to OrderedDict for repositioning keys to the ends. 2010-09-06 21:26:09 +00:00
Raymond Hettinger 7babc1b6a5 Better method name. Tighten inner-loop with bound methods. 2010-09-02 19:56:28 +00:00
Raymond Hettinger 331722d411 Make OrderedDict.popitem() a bit smarter and faster 2010-09-02 18:44:16 +00:00
Raymond Hettinger 38d17e3df0 Speed-up cache updates 2010-09-02 09:44:28 +00:00
Raymond Hettinger d331ce9e66 Issue #9507: Named tuple repr will now automatically display the right
name in a tuple subclass.
2010-08-08 01:13:42 +00:00
Raymond Hettinger 5be21b7a5a Update OrderedDict implementation to match that in Py2.7. 2010-08-01 22:10:57 +00:00
Raymond Hettinger fc3c9cd793 Minor factoring 2010-04-11 20:41:56 +00:00
Raymond Hettinger 9c01e441bb Add a subtract() method to collections.Counter() 2010-04-03 10:32:58 +00:00
Raymond Hettinger 7b0d3c6d4b Add nice docstrings to namedtuples. 2010-04-02 18:54:02 +00:00
Antoine Pitrou da2ecaf334 Merged revisions 77241 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r77241 | antoine.pitrou | 2010-01-02 22:12:58 +0100 (sam., 02 janv. 2010) | 4 lines

  Issue #7462: Implement the stringlib fast search algorithm for the `rfind`,
  `rindex`, `rsplit` and `rpartition` methods.  Patch by Florent Xicluna.
........
2010-01-02 21:40:36 +00:00
Raymond Hettinger f909202c11 Issue 6370: Performance issue with collections.Counter(). 2009-06-29 18:30:43 +00:00
Raymond Hettinger 089ba7f690 Fix field name conflicts for named tuples. 2009-05-27 00:38:24 +00:00
Benjamin Peterson 25c95f1298 Merged revisions 70768,71657,71721,71729,71794,71976,72036-72037,72079,72085,72131-72134,72191,72197-72198,72219,72221,72225,72303,72434,72467,72476 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r70768 | andrew.kuchling | 2009-03-30 17:29:15 -0500 (Mon, 30 Mar 2009) | 1 line

  Typo fixes
........
  r71657 | vinay.sajip | 2009-04-16 14:07:37 -0500 (Thu, 16 Apr 2009) | 1 line

  Issue #5768: Change to Unicode output logic and test case for same.
........
  r71721 | benjamin.peterson | 2009-04-18 14:26:19 -0500 (Sat, 18 Apr 2009) | 1 line

  fix a few nits in unittest.py #5771
........
  r71729 | benjamin.peterson | 2009-04-18 16:03:10 -0500 (Sat, 18 Apr 2009) | 1 line

  move test to a more appropiate one
........
  r71794 | vinay.sajip | 2009-04-22 07:10:47 -0500 (Wed, 22 Apr 2009) | 2 lines

  Issue #5170: Fixed regression caused when fixing #5768.
........
  r71976 | mark.dickinson | 2009-04-26 14:54:55 -0500 (Sun, 26 Apr 2009) | 2 lines

  Fix typo in function name
........
  r72036 | georg.brandl | 2009-04-27 12:04:23 -0500 (Mon, 27 Apr 2009) | 1 line

  #5848: small unittest doc patch.
........
  r72037 | georg.brandl | 2009-04-27 12:09:53 -0500 (Mon, 27 Apr 2009) | 1 line

  #5840: dont claim we dont support TLS.
........
  r72079 | r.david.murray | 2009-04-28 14:02:55 -0500 (Tue, 28 Apr 2009) | 2 lines

  Remove spurious 'u'.
........
  r72085 | georg.brandl | 2009-04-28 16:48:35 -0500 (Tue, 28 Apr 2009) | 1 line

  Make the doctests in the docs pass, except for those in the turtle module.
........
  r72131 | benjamin.peterson | 2009-04-29 17:43:35 -0500 (Wed, 29 Apr 2009) | 1 line

  fix test_shutil on ZFS #5676
........
  r72132 | georg.brandl | 2009-04-29 17:44:07 -0500 (Wed, 29 Apr 2009) | 1 line

  #5878: fix repr of re object.
........
  r72133 | benjamin.peterson | 2009-04-29 17:44:15 -0500 (Wed, 29 Apr 2009) | 1 line

  make sure mode is removable while cleaning up test droppings
........
  r72134 | benjamin.peterson | 2009-04-29 19:06:33 -0500 (Wed, 29 Apr 2009) | 1 line

  make sure to close file
........
  r72191 | michael.foord | 2009-05-02 06:43:06 -0500 (Sat, 02 May 2009) | 9 lines

  Adds an exit parameter to unittest.main(). If False main no longer
  calls sys.exit.

  Closes issue 3379.

  Michael Foord

........
  r72197 | benjamin.peterson | 2009-05-02 11:24:37 -0500 (Sat, 02 May 2009) | 1 line

  don't let sys.argv be used in the tests
........
  r72198 | andrew.kuchling | 2009-05-02 12:12:15 -0500 (Sat, 02 May 2009) | 1 line

  Add items
........
  r72219 | michael.foord | 2009-05-02 15:15:05 -0500 (Sat, 02 May 2009) | 8 lines

  Add addCleanup and doCleanups to unittest.TestCase.

  Closes issue 5679.

  Michael Foord
........
  r72221 | benjamin.peterson | 2009-05-02 15:26:53 -0500 (Sat, 02 May 2009) | 1 line

  add myself
........
  r72225 | michael.foord | 2009-05-02 17:43:34 -0500 (Sat, 02 May 2009) | 1 line
........
  r72303 | benjamin.peterson | 2009-05-04 19:55:24 -0500 (Mon, 04 May 2009) | 1 line

  using sys._getframe(x), where x > 0 doesnt' work on IronPython
........
  r72434 | r.david.murray | 2009-05-07 13:09:58 -0500 (Thu, 07 May 2009) | 2 lines

  Pre-opened test file needs to be opened in binary mode.
........
  r72467 | georg.brandl | 2009-05-08 07:17:34 -0500 (Fri, 08 May 2009) | 1 line

  Fix name.
........
  r72476 | thomas.heller | 2009-05-08 15:09:40 -0500 (Fri, 08 May 2009) | 4 lines

  Add a file that contains diffs between offical libffi files and the
  files in this repository.  Should make it easier to merge new libffi
  versions.
........
2009-05-08 20:42:26 +00:00
Raymond Hettinger 446a4f2330 Minor factoring. 2009-04-08 08:28:28 +00:00
Raymond Hettinger 2352cf3519 Typo. 2009-04-08 01:16:27 +00:00
Raymond Hettinger f04fa1bcc5 Add docstrings. 2009-04-08 01:15:02 +00:00
Benjamin Peterson 2504b7a06f must provide this method 2009-04-04 17:26:32 +00:00
Raymond Hettinger c47917071a Replace the localized min/max calls with normal if/else 2009-04-04 08:48:03 +00:00
Raymond Hettinger 5614524293 Have namedtuple's field renamer assign names that
are consistent with the corresponding tuple index.
2009-04-02 22:31:59 +00:00
Raymond Hettinger 52dc06b23c Separate initialization from clearing. 2009-03-25 22:45:22 +00:00
Raymond Hettinger 798ee1a4c6 Make imported name private and wrap long-line. 2009-03-23 18:29:11 +00:00
Raymond Hettinger f173654db8 Forward port r70533 and r70538. 2009-03-23 05:19:21 +00:00
Raymond Hettinger bfb5456142 Fix typo 2009-03-19 23:23:15 +00:00
Raymond Hettinger 18ed2cbc75 Forward port 70475: Add implementation notes. Put methods in more readable order. 2009-03-19 23:14:39 +00:00
Raymond Hettinger dc879f033c Forward port r70470 and r70473 for OrderedDict to use a doubly linked list. 2009-03-19 20:30:56 +00:00
Raymond Hettinger 89194ff280 Now that __keys are fully hidden, switch the underlying structure
to deque() which futher reduces the temptation to index or resort.
Also, it is a bit faster for some cases.
2009-03-03 22:42:48 +00:00
Raymond Hettinger 14b89ffc7e Fix-up __reduce__ which could not reach the __keys variable indirectly.' 2009-03-03 22:20:56 +00:00
Raymond Hettinger 08c70cf53c Make the underlying data structure more private. 2009-03-03 20:47:29 +00:00
Raymond Hettinger a4f52b12d6 Add OrderedDict support to collections.namedtuple(). 2009-03-02 22:28:31 +00:00
Raymond Hettinger ea9f8db2a2 Missed my last update to __eq__ to check matching length. 2009-03-02 21:28:41 +00:00
Raymond Hettinger 2d32f63ec9 PEP 372: OrderedDict() 2009-03-02 21:24:57 +00:00
Benjamin Peterson a86f2c06fd Merged revisions 69466,69480 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/trunk

........
  r69466 | raymond.hettinger | 2009-02-09 12:39:41 -0600 (Mon, 09 Feb 2009) | 3 lines

  Issue 5171: itertools.product docstring missing 'repeat' argument
........
  r69480 | raymond.hettinger | 2009-02-09 19:24:05 -0600 (Mon, 09 Feb 2009) | 1 line

  Issue 1818: collections.namedtuple() to support automatic renaming of invalid fieldnames.
........
2009-02-10 02:41:10 +00:00
Mark Dickinson a56c467ac3 Issue #1717: Remove cmp. Stage 1: remove all uses of cmp and __cmp__ from
the standard library and tests.
2009-01-27 18:17:45 +00:00