=?KOI8-R?B?7cnU0Q==?= wrote in news:f1a77a69-2997-4f53-9a46-
[EMAIL PROTECTED] in comp.lang.python:

> 
> class Film(object):
>     def __init__(self, title):
>         self.__title = title
> 
>     @getproperty
>     def title(self):
>         return self.__title
>     @setproperty
>     def title(self, value):
>         self.__title = value
> 
> properties_to_set = ['title']
> f = Film('aaa')

Ther is a builtin `setattr` to do this:

#http://www.python.org/doc/2.5.2/lib/built-in-funcs.html

setattr( f, "title", "bbb" )

Rob.
-- 
http://www.victim-prime.dsl.pipex.com/
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to