I want to access an instance var from a class outside the __init__, but I'm getting stuck!
import sys
class Borg(object):
__shared_state = {}
def __init__(self, nombre):
self.__dict__ = self.__shared_state
self.nombre = nombre
print 'my instance vr::', self.nombre
# panga = 'pangas'
panga = 'pangas'
print 'te copio con '
print panga
#print self.nombre
pingus = Borg('varString')
print pingus.nombre
If I uncomment print self.nombre, I get that "self.nombre is not recognized"?
How do I access this var?
import sysis wrong, too.)