Hello people

To put it short and sweet (jython 2.1)

**** code start ****
import org.python.core

global myName
myName = 'test'

def getProperty(name):
  print getattr(self, name)

getProperty('nyName')

**** code end ****

fails with error  NameError: self

I was hoping for it to print 'test' - what wrong and how do I fix it?

Cheers

Nicolai


CSC • This is a PRIVATE message. If you are not the intended recipient, please delete without copying and kindly advise us by e-mail of the mistake in delivery.  NOTE: Regardless of content, this e-mail shall not operate to bind CSC to any order or other contract unless pursuant to explicit written agreement or government initiative expressly permitting the use of e-mail for such purpose • CSC Danmark A/S • Registered Office: Retortvej 8, DK -1780 Copenhagen V , Denmark • Registered in Denmark No: 15231599