Re: Unbound Method Error

2009-06-09 Thread Piet van Oostrum
> "Enrico" <4...@755189.45> (E) wrote: >E> "Piet van Oostrum" ha scritto nel messaggio >E> news:m2ljo1ajnx@cs.uu.nl... >>> The method doesn't need the class at all, so a staticmethod would be >>> preferable: >>> class Funcoes: >>> @staticmethod >>> def CifradorDeCesar(self, mensagem, chav

Re: Unbound Method Error

2009-06-09 Thread Chris Rebert
On Tue, Jun 9, 2009 at 8:19 AM, Scott David Daniels 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, ch

Re: Unbound Method Error

2009-06-09 Thread Scott David Daniels
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 wan

Re: Unbound Method Error

2009-06-09 Thread Enrico
"Piet van Oostrum" ha scritto nel messaggio news:m2ljo1ajnx@cs.uu.nl... > The method doesn't need the class at all, so a staticmethod would be > preferable: > class Funcoes: > @staticmethod > def CifradorDeCesar(self, mensagem, chave, funcao): Yes, in this case self is not needed. >

Re: Unbound Method Error

2009-06-09 Thread Enrico
"lczancanella" ha scritto nel messaggio news:32bf5ccb-5bfd-49a5-b423-9d41180a0...@l28g2000vba.googlegroups.com... > 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 Ci

Re: Unbound Method Error

2009-06-09 Thread Piet van Oostrum
> "Enrico" <4...@755189.45> (E) wrote: >E> "lczancanella" ha scritto nel messaggio >E> news:32bf5ccb-5bfd-49a5-b423-9d41180a0...@l28g2000vba.googlegroups.com... >>> 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

Re: Unbound Method Error

2009-06-08 Thread Chris Rebert
On Mon, Jun 8, 2009 at 7:23 PM, 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): >        mensagem_encrip