Forward References?

Jerome Chan eviltofu at rocketmail.com
Tue Apr 18 03:59:38 CEST 2000


Just a silly question but how do I do forward references?


class a:
   def x(self):
      y(self)
   def y(self):
      print "Hello"

c = a()
c.x()
c.y()

gives a NameError: y



More information about the Python-list mailing list