On Jul 8, 8:29 pm, Paul McGuire <[EMAIL PROTECTED]> wrote:
> On Jul 8, 2:11 pm, mshiltonj <[EMAIL PROTECTED]> wrote:
> I have some comments on the Pythonicity of your suggestions. Same
> assumption, object attr is a unique key of some sort. How to create
> the dic
On Jul 8, 2:18 pm, [EMAIL PROTECTED] wrote:
> Hello all,
>
> Imaybe someone can help me with this question.
> Is there a direct way of accessing an object instance, if all I know
> is the value of one of its attributes?
> The object is part of a list of objects, and I would like to pick the
> objec
On Jul 8, 2:31 pm, "OKB (not okblacke)"
<[EMAIL PROTECTED]> wrote:
> mshiltonj wrote:
> > In python, I'm doing something like this:
>
> > def three_fields(self, field1, field2, field3):
> > for field in (field1, field2, field3):
> >
I'm trying to find the preferred python idiom for access arbitrary
fields of objects at run time.
For example, say I have an object the business code will do
*something* with three arbitrary fields at a given time, but I don't
know what the three fields are at run time. In perl, I'd do something