>>1
take a loot at the error messages in the interpreter
Name:
Anonymous2011-10-01 8:01
one word: THE FORCED INDENTATION OF CODE!!!!!!!!
Name:
Anonymous2011-10-01 8:17
Today is useful Anonymous day.
>>1
Default parameters are read and evaluated only once, at definition time. As Python defines changeturn, y is bound to the default value of "x", forever.
In order to implement your desired behaviour, do as follows:
class tic(object):
turn = "x"
def changeturn(self, y = None):
if not y:
y = self.turn
if y == "x":
self.turn = "o"
if y == "o":
self.turn = "x"
Also, please inherit from Object in your classes: class tic(object).
>>8 Default parameters are read and evaluated only once, at definition time.
I fell victim to this more than once. def function(x=[]), for example. Changing this list afterwards and calling the function again is bad news. Fucking bad news.
;; This is stupid IMO but your code does the same so i supported it:
(tic 'changeturn 'x)
(tic 'turn) y
Name:
Anonymous2011-10-01 17:12
>>8 Default parameters are read and evaluated only once, at definition time
Yo homegirl, there is only "compile time" and "run time".
As Python defines changeturn, y is bound to the default value of "x", forever
Not really. Reread the python docs again you jew.
Name:
John Carmack2011-10-01 17:20
Focused, hard work is the real key to success. Keep your eyes on the goal, and just keep taking the next step towards completing it. If you aren't sure which way to do something, do it both ways and see which works better.
Name:
Anonymous2011-10-01 18:50
>>8 Also, please inherit from Object in your classes: class tic(object).
What's the purpose of this?
Yo homegirl, there is only "compile time" and "run time".
In Python, definition happens dynamically (i.e. in run time) as the program reaches defs and classes. Definition time is the point in run time at which a function or a class is defined, you faggot.
>>19
Clearly your thoughts lack focus. Have you ever read an academic paper containing a definition? (Hahaha, who am I kidding, you probably can't even read.) When do you think this agglomeration of big words came to be a ``definition''? When the author thought of it? When he wrote it down? When he refined it? After the paper was published? After it was reviewed? After it became popular?
You see, this is quite an interesting situation that warrants deeper discussion.
That's not what my graduate advisor at UC Berkeley told me back in 2001.
Have you ever read an academic paper containing a definition?
Yes. It's called the lower division classes you moron.
When do you think this agglomeration of big words came to be a ``definition''? When the author thought of it? When he wrote it down? When he refined it? After the paper was published? After it was reviewed? After it became popular?
Okay, I really can't tell if you're trolling or if you're just plain fucking stupid. Either way, go run off and scrub another toilet you fucking mental midget.
Name:
Anonymous2011-10-02 16:32
>>22
Go suck another midget you fucking human toilet.
That's not what my graduate advisor at UC Berkeley told me back in 2001.
Your thoughts lack focus.
Have you ever read an academic paper containing a definition?
Yes. It's called the lower division classes you moron.
It's called it.
When do you think this agglomeration of big words came to be a ``definition''? When the author thought of it? When he wrote it down? When he refined it? After the paper was published? After it was reviewed? After it became popular?
Okay, I really can't tell if you're trolling or if you're just plain fucking stupid. Either way, go run off and scrub another toilet you fucking mental midget.
The mental midgets will be the only survivors when a piece of razor wire whips through the room.