Jump to content

Add a variable to a class instance at runtime: Difference between revisions

Line 132:
</lang>
'''Dictionary:'''
In this example we createwill an object fromadd a bless'edvariable dictionary.through the Weuse assignof an external, to the object, functionfrom (sub_func) toa thebless'ed variable 'sub'dictionary. AdditionallyWe create a new variable called 'newVar' at runtime and assign a string to it. Additionally we assign an external, to the object, function (sub_func) to the variable 'sub'.
<lang falcon>
function sub_func( value )
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.