Message115316
Re-opening and re-titling the issue to that effect.
Proposed syntax and usage:
# in Lib/abc.py
class ABCMeta(type):
# ...
def has_methods(cls, subclass):
"Returns True iff subclass implements the appropriate methods"
# ...
Usage within the unit tests:
# In Lib/test/test_collections.py
def test_methods(self):
self.assertTrue(Sequence.has_methods(range))
self.assertTrue(MutableSet.has_methods(set))
# ... and many more |
|
Date |
User |
Action |
Args |
2010-09-01 15:31:17 | stutzbach | set | recipients:
+ stutzbach, gvanrossum, benjamin.peterson, eric.araujo |
2010-09-01 15:31:17 | stutzbach | set | messageid: <1283355077.18.0.617238375857.issue9731@psf.upfronthosting.co.za> |
2010-09-01 15:31:14 | stutzbach | link | issue9731 messages |
2010-09-01 15:31:14 | stutzbach | create | |
|