On Tue, Jun 9, 2009 at 8:19 AM, Scott David Daniels<scott.dani...@acm.org> wrote: > lczancanella wrote: >> >> Hi, i am brand new in Python, so sorry if this question is too basic, >> but i have tried a lot and dont have success... I have the following >> code... >> >> class Funcoes: >> def CifradorDeCesar(mensagem, chave, funcao): >> ... >> > > You've gotten some "interesting" advice. > > You want one of: > > class Funcoes: > �...@staticmethod > def CifradorDeCesar(mensagem, chave, funcao): > ... > or: > class Funcoes: > def CifradorDeCesar(self, mensagem, chave, funcao): > ... > or: > class Funcoes: > �...@class_method
There's no underscore in "classmethod" last time I checked. > def CifradorDeCesar(class_, mensagem, chave, funcao): > ... You forgot one more option (the preferred one, IMHO): #module toplevel def CifradorDeCesar(mensagem, chave, funcao): Cheers, Chris -- http://blog.rebertia.com -- http://mail.python.org/mailman/listinfo/python-list