Moin!
Habe hier gepostet, weil ich glaube, dass es ein mod_python-Problem ist.
Folgendes Ding: Ich benutze mod_python und mache an einer Stelle im handler sowas:
Code: Alles auswählen
class Something:
def set_x(self, x):
self.inst.x = x
print repr(self.inst) # XXX
x = property(get_x, set_x)
# ...
def a_func_thatll_be_called_early:
global S, obj
S = Something()
# ...
obj = OtherClass()
S.inst = obj # ZUWEISUNG
print repr(obj)
def another_func_thatll_be_called_later:
global S, obj
print repr(obj) # YYY
Hat jemand eien Erklärung für dieses absolut unberechenbare Verhalten? Ich hätte schon gerne, dass eine Variable wirklich den Wert hat, den ich ihr zuweise und nicht irgendeinen den sie vorher mal hatte (und das noch nichtmal konsequent)!
Bitte helft mir, ich bin am verzweifeln! (So kann ich ja nicht weiter coden
