Unbound Method Error

Enrico 4564 at 755189.45
Tue Jun 9 16:16:06 CEST 2009


"Piet van Oostrum" <piet at cs.uu.nl> ha scritto nel messaggio
news:m2ljo1ajnx.fsf at 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.

>
> But as been mentioned in this thread before, there might be no reason to
> use the class anyway.

I agree but the code is not very clear about the use of this class as
ancestor of MC.
>>class MC(Funcoes, type):
?

Enrico







More information about the Python-list mailing list