Bulding python module using C

Michael Hoffman m.h.3.9.1.without.dots.at.cam.ac.uk at example.com
Fri Sep 24 10:01:08 EDT 2004


Andrew Degtiariov wrote:

> Traceback (most recent call last):
>   File "test.py", line 6, in ?
>     n.first = 'test'
> TypeError: can't set attributes of built-in/extension type 'noddy3.Noddy'
> 
> Where was i wrong?

You are trying to set an attribute on the type instead of an *instance* 
of the type.

> n = noddy3.Noddy

n = noddy3.Noddy()
--
Michael Hoffman



More information about the Python-list mailing list