Why won't this decorator work?

John Salerno johnjsal at gmail.com
Mon Jul 4 05:24:07 CEST 2011


On Jul 3, 1:01 pm, "OKB (not okblacke)"
<brenNOSPAMb... at NObrenSPAMbarn.net> wrote:

> subsequent calls to it will behave differently.  If you want ALL calls
> to your method to roll a die to get a random number, and then use that
> random number, why not just roll the die inside the method itself:

I thought maybe it would be cleaner if the roll function was something
separate, but I suppose it could go inside the move method. It just
seemed like two different things that needed to be separated.



More information about the Python-list mailing list