google-code-export / django-values

Automatically exported from code.google.com/p/django-values
1 stars 1 forks source link

TypeError raised when Group subclasses have docstrings #10

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
If you give any of your Group subclasses a docstring:

    class QuoteOptions(dbsettings.Group):
        """Test"""
        vat = dbsettings.PercentValue(u'VAT')

...GroupBase.__init__ will raise the following TypeError:

    "The type of __doc__ (str) is not a valid Value."

Is it sufficient to explicitly check for __doc__ and skip over it, or
should you really be doing something with it?

Original issue reported on code.google.com by jonathan.buchanan on 17 Jul 2007 at 10:53

GoogleCodeExporter commented 9 years ago
I just put in a fix that pops __doc__ off the dictionary, just like __module__, 
so 
it's effectively ignored. You're right that there might be some value in having 
docstrings enable some extra support, but I'm not sure what that would be at 
this 
point.

So, since this issue was entered for the error, I'm closing it now that it's 
fixed. 
If you have a particular feature you think the docstrings would be good for, 
feel 
free to submit a ticket for it.

Original comment by gulop...@gmail.com on 18 Jul 2007 at 1:16