MonkeeSage a écrit : > On Nov 27, 4:22 am, Bruno Desthuilliers > >> You don't have to subclass function to define a callable type that >> implements the descriptor protocol so it behaves just like a function in >> the context of an attribute lookup. > > I'm aware, and I understand that python's types (as with other duck- > typed languages) are basically just an object's capabilities; I was > just pointing out that, if needed (though I can't think of why > offhand...mabye some kind of sandbox?), you can detect built-in > functions.
Ok. > Hmm...but then again, it seems that shadowing a built-in > function still reports as it's type as FunctionType... Of course (at least as long as you sahdow it with another function) - Why would it be otherwise ? -- http://mail.python.org/mailman/listinfo/python-list