Re: getattr
- From: "Fredrik Lundh" <fredrik@xxxxxxxxxxxxxx>
- Date: Fri, 30 Sep 2005 18:21:12 +0200
kyaBey@xxxxxxxxx wrote:
> Is there any way by which the __getattr__(self,attr) method can
> determine that in
> case a) attr == 'bar' is the final component in the reference unlike in
> case b) where attr=='bar' is NOT the ultimate(final) component of
> reference and is an intermediate component in the reference.
no.
if you want to control further accesses, your __getattr__ has to return a
proxy object, and use a suitable syntax to get the final value.
</F>
.
- References:
- getattr
- From: kyaBey@xxxxxxxxx
- getattr
- Prev by Date: Opinion on Pyrex
- Next by Date: Re: Feature Proposal: Sequence .join method
- Previous by thread: getattr
- Next by thread: Re: getattr
- Index(es):