开发者

pydev - call a function with only self as argument

I am new to PyDev, written scripts using mainly notepad++ and jedit where I never had these issues. In a module, I h开发者_JS百科ave defined a function - get_user_inputs(self). I used the argument self as PyDev would not let me define the function othewise (and apparently it is the right thing to do).

Now my question is how do I call this function and what argument should I pass? function(self) does not work and self.function does not work as well.

This issue I am seeing only in PyDev. In jedit and notepad++ I am able to execute same code with no issues.


The argument self is only necessary for class methods. It doesn't make sense for normal functions.

That means you either omitted a vital information in your question or there is a bug in PyDev.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜