Ticket #2323 (closed enhancement: fixed )

Opened 3 years ago

Last modified 2 years ago

support deque in objgrep

Reported by: glyph Assigned to: therve
Type: enhancement Priority: highest
Milestone: Component: core
Keywords: Cc:
Branch: Author:
Launchpad Bug:

Description

This is an outgrowth of #1134, but maybe it would be useful on its own.

Attachments

test_reflect_2323.diff (3.4 kB) - added by therve 2 years ago.

Change History

  2006-12-23 06:51:37+00:00 changed by glyph

Committed to branch dqog-2323.

  2006-12-23 08:54:56+00:00 changed by glyph

  • owner changed from glyph to thomasvs

At the very least, testDeque should be test_deque and have a docstring. Are there any arguments against adding this though? I personally can't think of any.

  2006-12-23 08:55:29+00:00 changed by glyph

  • owner changed from thomasvs to therve

  2006-12-23 09:17:21+00:00 changed by therve

I'd to use a bit of duck-typing here to test list-like objects and not rely on isinstance.

  2006-12-23 18:19:18+00:00 changed by exarkun

You really need to do type checking here because that's the only way to be certain you are correctly accounting for references.

Unless you do something entirely different instead.

I'd like to see something based on gc.get_referents(), since that will work for pretty much any type.

  2007-01-12 11:29:00+00:00 changed by therve

  • attachment test_reflect_2323.diff added

  2007-01-12 11:31:00+00:00 changed by therve

  • keywords set to review
  • owner deleted
  • priority changed from normal to highest

Added a few docstring, and change method names to conform new standard. The patch is against the branch.

  2007-01-27 16:27:42+00:00 changed by exarkun

(In [19486]) apply patch attached to ticket

Refs #2323

  2007-01-27 16:39:09+00:00 changed by exarkun

  • keywords deleted
  • owner set to therve

Might be nice to update the types.ListType? and types.TupleType? on the changed line in reflect.py to just be list and tuple.

Changes all look good. Make the above change if you want, and merge.

  2007-01-27 17:30:53+00:00 changed by therve

  • status changed from new to closed
  • resolution set to fixed

(In [19490]) Merge dqog-2323

Author: therve Reviewer: exarkun Fixes #2323

Add support for deque in reflect.objgrep.

Note: See TracTickets for help on using tickets.