[Author Prev][Author Next][Thread Prev][Thread Next][Author Index][Thread Index]

Re: [pygame] Text-Based RPG



On Jun 18, 2007, at 3:44 PM, kschnee@xxxxxxxxxx wrote:

On Mon, June 18, 2007 4:58 pm, Dave LeCompte (really) wrote:
Other folks have talked about returning values, which is good, but this
line makes me uneasy:

def command(command, current_room):

I'd stay away from using the same name for more than one thing. In this
case, you're naming the argument the same thing as the function...

As a side note: That's part of why I like using ThisFormat for function
names and lowercase_format for variable names. Doing so makes it more
obvious what each thing is. At worst you'd be calling "Command (command)".


To that end, this may interest you:

http://www.python.org/dev/peps/pep-0008/

-Casey