ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> komodo-beta
komodo-beta
Re: [Komodo-beta] code completion on static methods
by Trent Mick other posts by this author
Jan 29 2007 10:13AM messages near this date
view in the new Beta List Site
[Komodo-beta] code completion on static methods | Re: [Komodo-beta] code completion on static methods
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

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved