Dear All,
I would like to make a new class inheriting from a class based on UniqueRepresentation. My goal, among other things, is to preparse the arguments a little before calling the class I am inheriting from. Unfortunately this class also does some preparsing via __classcall__ to make the input hashable. Could you point me to the correct way of setting this up?

Sketch of the situation:

class OldFoo(UniqueRepresentation):
@staticmethod
   def __classcall__(self, data):
      # make data hashable
      return super(oldFoo, self).__classcall__(self, hashable_data)

   def __init__(self, hashable_data):
       # do something

class NewFoo(OldFoo):
# First neutralize OldFoo __classcall__
   __classcall__ = None

   def __init__(self, data):
       # preparse data then initialize OldFoo


If __classcall__ were not there I would call OldFoo.__init__ but this does not seem to work with OldFoo.__classcall__


Thanks
S.



--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/sage-devel/20190925222158.GE27171%40bunion.

Reply via email to