Copying attributes

Bengt Richter bokr at oz.net
Sat Jul 23 21:12:07 EDT 2005


On Sat, 23 Jul 2005 18:30:29 GMT, bokr at oz.net (Bengt Richter) wrote:
[...]
>Did it work on a quad face? What about putting in a debug print before places you use
>f.normal, e.g.
>    assert hasattr(f, 'normal'), 'This "f"\n----\n%r\n----\ndid not have a normal attribute!!' % f
>
>If f.repr doesn't give you enough info, you can format something better in the assert message string.
>>
f.__repr__ was what I meant (as called due to %r in format), sorry.

Regards,
Bengt Richter



More information about the Python-list mailing list