1. masklinn
  2. Extends

Commits

masklinn  committed 1d1a242

Add example of inherited extension rejection

  • Participants
  • Parent commits f0794d4
  • Branches default

Comments (0)

Files changed (1)

File README.rst

View file
     >>> Rejector().accepted_extension()
     False
 
+Naturally, the filter works for any subclass of the one it was added
+on::
+
+    >>> class RejectSon(Rejector):
+    ...     pass
+    >>> class SonRejectee(extends.Extend, RejectSon):
+    ...     def accepted_extension(self):
+    ...         return True
+    >>> RejectSon().accepted_extension()
+    False
+
+
 Limitations of Extends
 ======================