Customizing PSC

Emyr Thomas emyr.thomas at gmail.com
Tue Aug 14 10:18:54 UTC 2007


"Maurits van Rees" wrote...

> ... But I tend to do it like this:
>
>    def __get_appname(self):
>        return self.mapping.get('appname', 'default string')
>    def __set_appname(self, v):
>        if not isinstance(v, str): # or unicode, whatever
>            v = float(v)
>        self.mapping['appname'] = v
>    appname = property(__get_appname, __set_appname)

Thanks for taking the time to reply Maurits.
I now define the properties in the way you describe above, but I'm 
unfortunately still having the same problem :(

--Emyr 







More information about the Product-Developers mailing list