On Wed, Aug 3, 2011 at 4:02 AM, Chris Withers <[email protected]>wrote:

> Hi All,
>
> In:
>
> http://sphinx.pocoo.org/**domains.html?highlight=param#**info-field-lists<http://sphinx.pocoo.org/domains.html?highlight=param#info-field-lists>
>
> ...I see :type limit: to specify the type of the `limit` parameter but no
> way to specify the default of the `limit` parameter.
>
> On a hunch, I tried :default limit:, which didn't generate any warnings on
> make, but renders weirdly.
>
> Can someone explain?
>
> cheers,
>
> Chris
>
>
I'm not sure there is a way to display it exactly like you want (as a
separate field in the info-field-list). Such a thing might be nice, though.

I usually just describe the default in the description of the parameter.

So , going along with the example in the docs, I might do something like
this:

:param limit: maximum number of stack frames to show; defaults to None


I realize this isn't exactly what you are asking, but between putting the
default in the description, and potentially having it shown in the function
signature, this seems like it would be good enough for many use cases.

YMMV

Kevin Horn

-- 
You received this message because you are subscribed to the Google Groups 
"sphinx-dev" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sphinx-dev?hl=en.

Reply via email to