Hash of class from instance

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Joakim Storck

    #1

    Hash of class from instance

    Hello,

    Is there any way that I can find the hash value of a class from an
    instance?
    [color=blue][color=green][color=darkred]
    >>> class A:[/color][/color][/color]
    .... pass
    ....[color=blue][color=green][color=darkred]
    >>> a = A()
    >>> hash(A)[/color][/color][/color]
    10782976[color=blue][color=green][color=darkred]
    >>> hash(a)[/color][/color][/color]
    12251904[color=blue][color=green][color=darkred]
    >>>[/color][/color][/color]

    What I want is a function that returns the value of 'hash(A)':[color=blue]
    > a.getHashOfClas s()[/color]
    10782976

    Is this possible?

    /Joakim

Working...