{"action":"created","issue":{"url":"https://api.github.com/repos/JuliaDocs/DocStringExtensions.jl/issues/19","repository_url":"https://api.github.com/repos/JuliaDocs/DocStringExtensions.jl","labels_url":"https://api.github.com/repos/JuliaDocs/DocStringExtensions.jl/issues/19/labels{/name}","comments_url":"https://api.github.com/repos/JuliaDocs/DocStringExtensions.jl/issues/19/comments","events_url":"https://api.github.com/repos/JuliaDocs/DocStringExtensions.jl/issues/19/events","html_url":"https://github.com/JuliaDocs/DocStringExtensions.jl/issues/19","id":172403209,"number":19,"title":"Include the defaults for keyword arguments","user":{"login":"pwl","id":72500,"avatar_url":"https://avatars.githubusercontent.com/u/72500?v=3","gravatar_id":"","url":"https://api.github.com/users/pwl","html_url":"https://github.com/pwl","followers_url":"https://api.github.com/users/pwl/followers","following_url":"https://api.github.com/users/pwl/following{/other_user}","gists_url":"https://api.github.com/users/pwl/gists{/gist_id}","starred_url":"https://api.github.com/users/pwl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwl/subscriptions","organizations_url":"https://api.github.com/users/pwl/orgs","repos_url":"https://api.github.com/users/pwl/repos","events_url":"https://api.github.com/users/pwl/events{/privacy}","received_events_url":"https://api.github.com/users/pwl/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/JuliaDocs/DocStringExtensions.jl/labels/Priority:%20Medium","name":"Priority: Medium","color":"fdbe85"},{"url":"https://api.github.com/repos/JuliaDocs/DocStringExtensions.jl/labels/Status:%20Available","name":"Status: Available","color":"d0d1e6"},{"url":"https://api.github.com/repos/JuliaDocs/DocStringExtensions.jl/labels/Type:%20Decision","name":"Type: Decision","color":"88419d"},{"url":"https://api.github.com/repos/JuliaDocs/DocStringExtensions.jl/labels/Type:%20Enhancement","name":"Type: Enhancement","color":"8c6bb1"}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-08-22T09:12:20Z","updated_at":"2016-08-22T10:19:31Z","closed_at":null,"body":"For example, `DocStringExtensions` produces the signature\r\n\r\n```julia\r\niterate(ivp; solver, opts...)\r\n```\r\n\r\nfor the following function definition\r\n```\r\nfunction iterate{S<:AbstractSolver}(ivp::IVP;\r\n                                    solver::Type{S} = RKIntegratorAdaptive{:rk45},\r\n                                    opts...)\r\n```\r\nIn some cases this might be enough, but it would be helpful to be able to generate an output including the default value for the keyword arguments like this\r\n\r\n```julia\r\niterate(ivp; solver=RKIntegratorAdaptive{:rk45}, opts...)\r\n```\r\n\r\nPossibly with a switch to turn this behavior on or off."},"comment":{"url":"https://api.github.com/repos/JuliaDocs/DocStringExtensions.jl/issues/comments/241371373","html_url":"https://github.com/JuliaDocs/DocStringExtensions.jl/issues/19#issuecomment-241371373","issue_url":"https://api.github.com/repos/JuliaDocs/DocStringExtensions.jl/issues/19","id":241371373,"user":{"login":"pwl","id":72500,"avatar_url":"https://avatars.githubusercontent.com/u/72500?v=3","gravatar_id":"","url":"https://api.github.com/users/pwl","html_url":"https://github.com/pwl","followers_url":"https://api.github.com/users/pwl/followers","following_url":"https://api.github.com/users/pwl/following{/other_user}","gists_url":"https://api.github.com/users/pwl/gists{/gist_id}","starred_url":"https://api.github.com/users/pwl/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pwl/subscriptions","organizations_url":"https://api.github.com/users/pwl/orgs","repos_url":"https://api.github.com/users/pwl/repos","events_url":"https://api.github.com/users/pwl/events{/privacy}","received_events_url":"https://api.github.com/users/pwl/received_events","type":"User","site_admin":false},"created_at":"2016-08-22T10:19:31Z","updated_at":"2016-08-22T10:19:31Z","body":"The switch would have to be per docstring.  The lengthy defaults would be trimmed or omitted completely.  But then, how do you decide which values are lengthy and how do you trim them?  Where do you insert the line breaks?  Wouldn't `KEYWORDS` have to deal with the lengthy defaults too?\r\n\r\nBut all this concerned, would it be possible to have a switch that would just plug in the defaults and another switch to force line breaks between arguments, so that the user can opt in on both behaviors?  Then let the user decide if the output is too long or unreadable.  Is it even technically possible to have per docstring switches like that?\r\n\r\nAlternatively there could be global formatting options (do we insert line breaks? do we trim the defaults? do we print the defaults by default?) and a statement `$(SIGNATURES_WITH_DEFAULTS)` including the defaults in the signature.  I don't know how readable the output be but I would gladly try it out.  Sorry if this might sound unrealistic, I've got no idea how the current functionality is implemented and what's possible or not.\r\n\r\n> it's not possible to just print out keyword = DEFAULT\r\n\r\nThat's a pity, I was going to suggest that.  I naively thought that this package works on strings representing the definitions, not the `Function` objects themselves.\r\n\r\nBy the way, why is `SIGNATURES` plural?  In which case does it print more then one signature?"}}
{"actor":{"display_login":"pwl"}}