Re: [Pydev-users] properties in pydev
Brought to you by:
fabioz
From: Fabio Z. <fa...@gm...> - 2008-07-27 21:41:28
|
Hi Lee, 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): > @apply > 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) > Just looking at the code you provided, it seems that this is correctly marked in pydev... the only exceptions that are not marked for the missing 'self' are classmethods and staticmethods... if this is a different pattern that should be treated, please give more details on that decorator and create a feature request so that it's also handled (maybe those could be options for the decorators that can accept no 'self' as a parameter). Cheers, Fabio |