factor InstrumentedList into subclasses for different types

Issue #213 resolved
Mike Bayer repo owner created an issue

turn InstrumentedList into InstrumentedCollection and create subclasses InstrumentedSet, InstrumentedDict, InstrumentedList which deal with those three types individually. Have a metaclass that spawns the correct one based on the data being given to it. add another option to relation that allows you to specify the key column to use when inserting items into InstrumentedDict; this is an alternative to using an append method tacked onto the underlying dictionary (but that way should remain too).

Comments (9)

  1. Mike Bayer reporter
    • changed milestone to 0.4.0

    0.3.0 has tons of architectural changes already so i want to push this one off a little bit.

  2. Mike Bayer reporter

    additionally, refactor ORM to use a specific iteration method on collection, so that InstrumentedDict does not have to redefine its __iter__() functionality to return values() instaed of keys().

  3. Mike Bayer reporter

    i think we should add the docs on this to the advanced datamapping docs and then this ticket can be closed.

  4. Log in to comment