(going slightly off topic, but may be relevant to elicitate the problem)

I haven't heard of (and couldn't find after a few minutes of googling the "@apply" as built-in decorator in python? (but then I haven't used py2.5 much...)

I know about propertyName = property(get,set)
and about the @Property decorator...

Is it possible you've mistyped in your code example?


On 24 Jul 2008, at 01:48, Lee Connell wrote:

when using properties in pydev, it marks the method as an error, saying that it should start with self as first parameter:

class AppConfig(object):
    def type(): <<-----------------------------------------------------------this is where it wants to see self as first parameter, however it is not needed in this situation.
        def set(self, val):
            _config['server']['type'] = val
        def get(self):
            return _config['server']['type']
        return property(get, set)

Stay in touch when you're away with Windows Live Messenger. IM anytime you're online. -------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
Pydev-users mailing list