property collections

Ben Wolfson wolfson at uchicago.edu
Mon May 21 11:52:17 EDT 2001


In article <l7iY5UA0wPC7Ewy0 at jessikat.demon.co.uk>, "Robin Becker"
<robin at jessikat.fsnet.co.uk> wrote:

> In article <20010520.122427.352118606.1074 at bur-jud-
> 175-197.rh.uchicago.edu>, Ben Wolfson <wolfson at uchicago.edu> writes
>>In article <g44pZKATy8B7Ewa2 at jessikat.fsnet.co.uk>, "Robin Becker"
>><robin at jessikat.fsnet.co.uk> wrote:
> ...
> well I tried and get an error
> 
> C:\Python\reportlab\graphics>python \tmp\tpc.py TPC a=1001 b=1002
> Traceback (most recent call last):
>   File "\tmp\tpc.py", line 34, in ?
>     print 'TPC[%d] a=%d b=%d'% (i, TPC[i].a, TPC[i].b)
> AttributeError: 'Properties' instance has no attribute 'b'

I realized after I posted the code that properties added to the instance
after an index is reference won't be available to the indexed instance.
Oops.

-- 
Barnabas T. Rumjuggler
I had a son once, I ain't got no son today
My son is gone now, my son is gone, oy weh
 -- Joe Frank, "Woman and Bull in a Paint Factory"



More information about the Python-list mailing list