def test_type_extensibility():
 from sympy.core import Basic
 class MyType(Basic, ):
  pass
 class MyAskHandler(AskHandler, ):
  @staticmethod
  def MyType(expr, assumptions):
   return True
 a = MyType()
 register_handler(Q.prime, MyAskHandler)
 assert (ask(Q.prime(a)) is True)

def test_type_extensibility ( ) : from sympy . core import Basic class MyType ( Basic , ) : pass class MyAskHandler ( AskHandler , ) : @ staticmethod def MyType ( expr , assumptions ) : return True a = MyType ( ) register_handler ( Q . prime , MyAskHandler ) assert ( ask ( Q . prime ( a ) ) is True )
test that new types can be added to the ask system at runtime we create a custom type mytype .