Hi Ryan, Yes, I know about doc strings. Thing is though I personally don't like them. I guess it has to do with the fact I come from a C/C++ background that using a doc string seams weird. Although, you have a point if I am going to use these apps as training tutorials I should use standard doc strings just to stick with standard Python coding conventions.
On 11/24/10, Ryan Smith <computerwi...@gmail.com> wrote: > Hi Thomas > Nice job with this! I just won a round on level 2. I'm glad you've > found Python as useful as I have. One suggestion though. I've noticed > you document your Python methods like this: > #Function: dealer_draw(). > #Description: Draws a new card for the dealer. > > Most Python programmers document their code with a DocString. For example: > > def buildConnectionString(params): > """Build a connection string from a dictionary of parameters. > > Returns string.""" > > Triple-quotes allow more than one line, if you simply want one line, > use one quote (like any string). There are a few reasons why you may > want to use DocStrings. First off, you can access it by using the > .__doc__ property. For example: buildConnectionString.__doc__. > Here is a more useful example: > from pydoc import help > help(buildConnectionString) > Help on function buildConnectionString in module __main__: > > buildConnectionString(params) > Build a connection string from a dictionary of parameters. > > Returns string. > > While it probably isn't worth the time to change your code to use > DocStrings, it might be useful to know in the future, especially if > people are looking to learn from it. > Thanks. > -Ryan --- Gamers mailing list __ Gamers@audyssey.org If you want to leave the list, send E-mail to gamers-unsubscr...@audyssey.org. You can make changes or update your subscription via the web, at http://audyssey.org/mailman/listinfo/gamers_audyssey.org. All messages are archived and can be searched and read at http://www.mail-archive.com/gam...@audyssey.org. If you have any questions or concerns regarding the management of the list, please send E-mail to gamers-ow...@audyssey.org.