]> git.ipfire.org Git - thirdparty/sqlalchemy/sqlalchemy.git/commitdiff
- Tighten up r4399 _set_iterable docs
authorJason Kirtland <jek@discorporate.us>
Tue, 1 Apr 2008 16:49:55 +0000 (16:49 +0000)
committerJason Kirtland <jek@discorporate.us>
Tue, 1 Apr 2008 16:49:55 +0000 (16:49 +0000)
lib/sqlalchemy/orm/attributes.py

index f0b1510f9768386283334b9a4e2bcc714906fb20..a511c9bbb6ee34b34c37080bd04e6199ca7c859e 100644 (file)
@@ -586,18 +586,17 @@ class CollectionAttributeImpl(AttributeImpl):
             lambda adapter, i: adapter.adapt_like_to_iterable(i))
 
     def _set_iterable(self, state, iterable, adapter=None):
-        """Set a collection value from an interable.
+        """Set a collection value from an iterable of state-bearers.
 
         ``adapter`` is an optional callable invoked with a CollectionAdapter
-        and the iterable.  Should return an iterable of instances suitable for
-        appending via a CollectionAdapter.  Can be used for, e.g., adapting an
-        incoming dictionary iterable to a list.
+        and the iterable.  Should return an iterable of state-bearing
+        instances suitable for appending via a CollectionAdapter.  Can be used
+        for, e.g., adapting an incoming dictionary into an iterator of values
+        rather than keys.
 
         """
-        # we need a CollectionAdapter to adapt the incoming value to an
-        # assignable iterable.  pulling a new collection first so that
-        # an adaptation exception does not trigger a lazy load of the
-        # old collection.
+        # pulling a new collection first so that an adaptation exception does
+        # not trigger a lazy load of the old collection.
         new_collection, user_data = self._build_collection(state)
         if adapter:
             new_values = list(adapter(new_collection, iterable))