From: Rick DeNatale Date: 2009-02-12T21:35:41+09:00 Subject: Re: docstrings --0016361e892a359f020462b7fa68 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit On Wed, Feb 11, 2009 at 6:01 PM, Roger Pack wrote: > I like docstrings for being able to know what dynamically generated > methods do. > For instance, in rails, there is no documentation for > > People.find_by_first_name # it's obvious, but--there is nothing in the > ri to lookup for it. Is it case sensitive? Does it assume defaults for > the other values? I guess by docstrings you mean Python docstrings, yes? I may be dense, but I'm not sure I see any difference in power here from what's provided by rdoc comments, which are effectively the Ruby version of docstrings. They might be terser, but they effectively serve the same role as far as I can tell. Since docstrings, like rdoc comments have to appear in the source code, I don't understand how they help documenting code which is dynamically generated when the program is run. In my current project, I recently switched over from dynamicly defined methods to a rake task to generate some of the source code in order to have the resulting methods documented with RDOC/RI. -- Rick DeNatale Blog: http://talklikeaduck.denhaven2.com/ Twitter: http://twitter.com/RickDeNatale --0016361e892a359f020462b7fa68--