0
>>> def func(): pass
>>> func
<function func at 0x10ce60400>

What is that address for? (The 0x10ce60400)
Where and what does it point to?

(I am talking about CPython 3.7)

Div
  • 1,363
  • 2
  • 11
  • 28
  • 2
    It's some memory location, *possibly*, depending on your flavour of Python. It has no real useful meaning. – deceze Jun 24 '19 at 11:31
  • 1
    That's just Python's way of saying "I don't know how to show you anything meaningful about this object", in this case a function object. It's simply an object identifier. It may or may not refer to a physical memory address. The identifier is not useful to you other than possibly to distinguish between two objects. – CryptoFool Jun 24 '19 at 11:31
  • 1
    Covered here https://stackoverflow.com/questions/121396/accessing-object-memory-address, As @deceze said, it might be a memory location (CPython) or might just be a number. It is an 'identity' which is guaranteed to be unique during the lifetime of the object. – Deepstop Jun 24 '19 at 11:36
  • I'm not trying to get more information on a function, just interested in what this address is – Div Jun 24 '19 at 12:33

0 Answers0