Commit 42fc7c80 authored by Wout De Nolf's avatar Wout De Nolf
Browse files


parent ff3df11d
......@@ -118,10 +118,12 @@ class UniversalHashable:
self.__instance_nonce = uhash_nonce
self.__original__instance_nonce = uhash_nonce
def __init_subclass__(cls, version=None, **kwargs):
def __init_subclass__(subcls, version=None, **kwargs):
cls.__VERSION = version
cls.__CLASS_NONCE = str(uhash((cls.class_nonce(), ) + cls.class_nonce_data()))
supercls_data = subcls.class_nonce()
subcls.__VERSION = version
subcls_data = subcls.class_nonce_data()
subcls.__CLASS_NONCE = str(uhash((subcls_data, supercls_data)))
def class_nonce(cls):
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment