[reportlab-users] Re: [reportlab-support] [Fwd: AttrMapValue
initials]
Robin Becker
robin at reportlab.com
Tue Feb 8 08:55:18 EST 2005
Steve Holden wrote:
.....
>
> Seems to me like nobody is using initial values in AttrMapValue objects,
> since there appears to be a long-standing bug in the code.
>
> Line 25 of lib/attrmap.py, which currently reads
>
> self.initial = initial
>
> should really read
>
> self._initial = initial
>
you're right we don't use initial values. Probably we should turn initial into a
readonly property, but until we move off 2.1 for all the customers that won't
work yet. Anyhow given that we will soon have decorators etc I suppose we should
consider a different kind of attribute setup.
> Given that this part of the code appears never to have been exercised,
> however, it might just be better to omit the __getattr__ "initial" hack
> altogether. Neither could I find any current uses of the "hidden" hack,
> and if I'm correct then the object could use the standard __getattr__.
>
> Didn't want to just hack this into the codebase as it's the kind of
> thing that might be used in a critical app like Fidelity that I'm not
> aware of.
>
> regards
> Steve
--
Robin Becker
More information about the reportlab-users
mailing list