开发者

forward and back command

wanted to know开发者_JS百科 how to write a forward and back command in a superclass not sure but i gave it a try dont know if its right or wrong some help plz

def forward(self):
  return (self.100)

def back(self):
  return (self.50)


def forward(self):
  self.position += self.distance
  return (self.position)

def back(self):
  self.position -= self.distance
  return (self.position)

EDIT: I assumed you are doing something like progress bar of install app, where some operation advances progress (copying files), and if user cancels install others operation make rollback (deleting files). Try ask a proper question as other users comment.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜