@Tony-Y thank you for answering my question, but your answer is not the one I was expecting and maybe because I used a simple example to present theano.function(). A more detailed explanation follows:
def function(inputs, outputs=None, mode=None, updates=None, …):
“”"
Return a class: callable object that will calculate outputs from inputs.
Parameters
----------
inputs :    list of either Variable or In instances.
Function parameters, these are not allowed to be shared variables.
outputs :  list or dict of Variables or Out instances.
If it is a dict, the keys must be strings. Expressions to compute.
mode :     string or Mode instance.
Compilation mode.
updates : iterable over pairs (shared_variable, new_expression). List, tuple or OrderedDict.
Updates the values for Shared Variable inputs according to these expressions.