[Zope3-checkins] CVS: Zope3/src/zope/app/interfaces/container - __init__.py:1.15
Garrett Smith
garrett@mojave-corp.com
Fri, 1 Aug 2003 15:47:18 -0400
Update of /cvs-repository/Zope3/src/zope/app/interfaces/container
In directory cvs.zope.org:/tmp/cvs-serv32092/src/zope/app/interfaces/container
Modified Files:
__init__.py
Log Message:
Added additional validation for input to updateOrder. Also ensured that _order is a PersistentList after this
call. Updated tests and interface docs accordingly.
=== Zope3/src/zope/app/interfaces/container/__init__.py 1.14 => 1.15 ===
--- Zope3/src/zope/app/interfaces/container/__init__.py:1.14 Tue Jul 22 12:42:13 2003
+++ Zope3/src/zope/app/interfaces/container/__init__.py Fri Aug 1 15:46:43 2003
@@ -99,9 +99,15 @@
"""
def updateOrder(order):
- """Revise the order of keys, replacing the current ordering
+ """Revise the order of keys, replacing the current ordering.
- Raise something(XXX) if the set of keys passed in is not complete.
+ order is a list or a tuple containing the set of existing keys in
+ the new order. order must contain len(keys()) items and cannot
+ contain duplicate keys.
+
+ Raises TypeError if order is not a tuple or a list.
+
+ Raises ValueError if order contains an invalid set of keys.
"""
class IOptionalNamesContainer(IContainer):