Re: [Komodo-beta] code completion on static methods
by Trent Mick other posts by this author
Jan 29 2007 12:02PM messages near this date
view in the new Beta List Site
Re: [Komodo-beta] code completion on static methods
|
[Komodo-beta] Additional syntax highlighting
Discussed with Lee in private email. For the record:
http://bugs.activestate.com/Komodo/show_bug.cgi?id=66214
Trent
Trent Mick wrote:
> Lee Connell wrote:
> > When using @staticmethod on a method within a class, komodo wonâ??t read
> > any parameters that are needed within that method, only if you put
> > â??selfâ?? in with your parameters in the definition. There is no need for
> > self I believe since itâ??s static, and if you do put â??selfâ?? in the
> > accepted parameters, calling the code, which now completes properly
> > fails because youâ??re not giving it enough arguments, thus because self
> > is not automatically being passed along as it is static.
>
> Do you mean that in the following example, the calltip for "a.a_staticmethod"
> is wrong:
>
>
> class AClass(object):
> def a_method(self, a, b):
> print "a_method(%r, %r)" % (a, b)
>
> @staticmethod
> def a_staticmethod(c, d):
> print "a_staticmethod(%r, %r)" % (c, d)
>
> a = AClass()
> a.a_staticmethod()
> `-- calltip here
>
> Current the calltip that Komodo shows here is "a_staticmethod(d)" -- which is
> wrong. It should be "a_staticmethod(c, d)".
>
> I'll add a testcase and bug for this. However, is this what you meant, Lee?
>
>
> Thanks,
> Trent
>
--
Trent Mick
trentm@[...].com
_______________________________________________
Komodo-beta mailing list
Komodo-beta@[...].com
http://listserv.ActiveState.com/mailman/listinfo/komodo-beta
Thread:
Lee Connell
Trent Mick
Trent Mick
|