references/pointers in Python?
Gordon McMillan
gmcm at hypernet.com
Fri Sep 14 07:38:24 EDT 2001
Patrick K. O'Brien wrote:
> That's the way I starting to go. But class A *is* under my control, so
> I'll bite - what is the better way to do this?
I have no idea. Class A consists of 10 flags and has no methods,
so it's difficult to see what it's purpose is.
If it has one, it must be as a minor player in a larger system
of objects, and that's where I'd look.
> "Gordon McMillan" <gmcm at hypernet.com> wrote in message
> news:Xns911BC3D19BBC5gmcmhypernetcom at 199.171.54.214...
>> Lots of ways you could do this. Probably the most "pythonic" (at
>> least, before Python 2.2) would be:
[snip]
>> This is a typical kind of pattern where class A is out of your
>> control. Where class A *is* under your control, I think you'll find a
>> better way to do it (once you've unlearned all the tricks you need to
>> survive in other object models).
More information about the Python-list
mailing list