Unbound Method Error
Piet van Oostrum
piet at cs.uu.nl
Tue Jun 9 20:05:47 CEST 2009
>>>>> "Enrico" <4564 at 755189.45> (E) wrote:
>E> "Piet van Oostrum" <piet at cs.uu.nl> ha scritto nel messaggio
>E> news:m2ljo1ajnx.fsf at cs.uu.nl...
>>> The method doesn't need the class at all, so a staticmethod would be
>>> class Funcoes:
>>> def CifradorDeCesar(self, mensagem, chave, funcao):
>E> 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.
>E> I agree but the code is not very clear about the use of this class as
>E> ancestor of MC.
>>>> class MC(Funcoes, type):
I hadn't even noted this peculiarity. Maybe it was thought to be
necessary because CifradorDeCesar is used in MC. But as it is
explicitly used as Funcoes.CifradorDeCesar the Funcoes in the base
classes is useless and therefore confusing.
Piet van Oostrum <piet at cs.uu.nl>
URL: http://pietvanoostrum.com [PGP 8DAE142BE17999C4]
Private email: piet at vanoostrum.org
More information about the Python-list