Contract.constructor()
Returns the constructor of the contract, if exists.
constructor() → Function | NoneObject
Example query
from glider import *
def query():
constructors = (
Contracts()
.exec(8)
.constructor()
.filter(lambda x: not isinstance(x, NoneObject))
)
return constructorsStarting with Glider 1.0, you can use functions from Contracts, Functions, and Instructions on APIList[Contract], APIList[Function], and APIList[Instruction]. More details are available on the Glider and Declarative Query Writing page.
Additionally, the filter function is used to ignore NoneObject. This occurs because not all contracts have a constructor, which may result in NoneObject being returned
Example output

Last updated