[Grok-dev] Re: Me Grok Play Chess!

Maurits van Rees m.van.rees at zestsoftware.nl
Sun Apr 15 19:09:54 EDT 2007

Philipp von Weitershausen, on 2007-04-15:
> (another comment on the code)
> * In Index.update(), you access request variables using 
> self.request.form.get(). A shortcut is to simply expect these as 
> parameters to udpate(), using default values to indicate the value that 
> the parameter should have when it's not in the request. Your update() 
> could look like this:
>      def update(promotion=False, reset=None, undo=None, redo=None,
>                 start=None, target=None, square=None):
>          ...
> Then you could save some repitition in the actual method implementation.

Done, thanks.

Maurits van Rees | http://maurits.vanrees.org/ [NL]
            Work | http://zestsoftware.nl/
"Do not worry about your difficulties in computers,
 I can assure you mine are still greater."

More information about the Grok-dev mailing list