[Checkins] SVN: zope.schema/branches/tseaver-test_cleanup/src/zope/schema/_bootstrapfields.py Note LSP violation.
Tres Seaver
cvs-admin at zope.org
Mon Apr 23 21:58:31 UTC 2012
Log message for revision 125244:
Note LSP violation.
See http://en.wikipedia.org/wiki/Liskov_substitution_principle.
Changed:
U zope.schema/branches/tseaver-test_cleanup/src/zope/schema/_bootstrapfields.py
-=-
Modified: zope.schema/branches/tseaver-test_cleanup/src/zope/schema/_bootstrapfields.py
===================================================================
--- zope.schema/branches/tseaver-test_cleanup/src/zope/schema/_bootstrapfields.py 2012-04-23 21:58:22 UTC (rev 125243)
+++ zope.schema/branches/tseaver-test_cleanup/src/zope/schema/_bootstrapfields.py 2012-04-23 21:58:28 UTC (rev 125244)
@@ -239,6 +239,9 @@
raise NotAContainer(value)
+# XXX This class violates the Liskov Substituability Principle: it
+# is derived from Container, but cannot be used everywhere an instance
+# of Container could be, because it's '_validate' is more restrictive.
class Iterable(Container):
def _validate(self, value):
More information about the checkins
mailing list