Message82889
The __getattr__ method, as written, assumes that an attribute 'args'
already exists. That's unsafe - a more robust approach would be:
def __getattr__(self, name):
if 'attrs' in self.__dict__ and name in self.attrs:
return self.attrs[name]
raise AttributeError(name)
The suggestion of using hasattr in pickle code doesn't work, because
hasattr is implemented using getattr.
I could not reproduce it with 2.6, nor the trunk -- there is another
recursion problem involving __subclasscheck__ but unpickling is
unaffected. 3.0 does show this problem. FWIW, 2.2 did not. |
|
Date |
User |
Action |
Args |
2009-02-28 05:55:29 | ggenellina | set | recipients:
+ ggenellina, mwm |
2009-02-28 05:55:28 | ggenellina | set | messageid: <1235800528.86.0.40535520318.issue5370@psf.upfronthosting.co.za> |
2009-02-28 05:55:27 | ggenellina | link | issue5370 messages |
2009-02-28 05:55:26 | ggenellina | create | |
|