I am a beginning python programmer and trying to learn the nuances in the language. I was trying out the types of objects that can be stored inside the values key in a dict
structure. Here goes my sample code:
myMap = {'a':1,'b':hash}
def myFun (a,b):
return a + b
myMap['c']=myFun
myMap
And here is the output:
{'a': 1, 'b': <function hash(obj, /)>, 'c': <function __main__.myFun(a, b)>}
I want to know why the function reference is enclosed by angle brackets. I have an inkling that this may be due to some resemblance to C code, but I am not able to get a definite answer. I read somewhere that this indicates that a function is a “special” object. But a more elaborate answer would be very helpful. Thanks for any suggestions.