Python Mixins

Tim Chase python.list at
Sat Sep 24 19:36:56 EDT 2011

On 09/24/11 17:41, rantingrick wrote:
> On Sep 24, 3:57 am, Steven D'Aprano<steve
> +comp.lang.pyt... at>  wrote:
>> class StandardTestMixin:
>>      def test_requires_one_argument(self):
>>          self.assertRaises(TypeError, self.func)
>>      def test_has_docstring(self):
>>          self.assertTrue(self.func.__doc__)
> And this is another example of why we need doc-string reforms. Here we
> have a well know "pythonista" (for lack of better word) who needs to
> write a test for doc-string inclusion because he refuses to get in the
> habit of writing them. People, EVERY method and function MUST have a
> doc-string! What is the purpose of having doc-strings if we are too
> lazy to use them!

The aim of this PEP is to standardize the high-level structure of 
docstrings: what they should contain, and how to say it (without 
touching on any markup syntax within docstrings). The PEP 
contains conventions, not laws or syntax.

You keep saying the word "MUST".  I do not think it means what 
you think it means.  Just for the record [1], [2], [3], [4] all 
in my first page of search Google search results.  Pot, meet 






More information about the Python-list mailing list