Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Python novice

Name: Anonymous 2011-09-29 17:35


class tic:
  turn = "x"
  def changeturn(self, y = turn):
    if y == "x":
      self.turn = "o"
    if y == "o":
      self.turn = "x"

'''WHY THE FUCK ISN'T this working? The changeturn(), I mean, it only works once!'''

Name: Anonymous 2011-10-01 19:01

>>11

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.

>>13
Make it a new-style class. Just do it.

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List