James Paige wrote:
On Mon, Jan 12, 2009 at 04:54:38PM -0800, Lenard Lindstrom wrote:Hi, James Paige wrote:
[snip]
Basically to save memory. It is also easy to overlook when coding a new extension type.You're right. Font instances lack attribute dictionaries. It was a design decision, or omission, and not a restriction of Font being implemented in C.f.pointsize = 12Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: 'pygame.font.Font' object has no attribute 'pointsize'I'm guessing that since pygame.font.Font is impelmented in C, it doesn't allow new members to be added as it would if it was implemented in python (Correct me if I am wrong)Ah, interesting. I stand corrected.Why was the attribute dictionary left out? What is the advantage? Is it a performance thing?
-- Lenard Lindstrom <len-l@xxxxxxxxx>