StateVariables.with_one_property()
Adds a filter to get state variables that at least have one of the given properties.
with_one_property(properties: List[StateVariableProp]) → StateVariables
Query Example
from glider import *
def query():
state_variables = (
StateVariables()
.with_one_property([StateVariableProp.PRIVATE, StateVariableProp.PUBLIC])
.exec(5)
)
print(state_variables[0].source_code())
print(state_variables[1].source_code())
return state_variablesExample Output

Last updated