More on slot wrapper objectsFollowing up on the first installment: Slot wrapper objects do not directly call the C functions that they
wrap up. Instead they check that they are being called with a We're not done yet, because there is another level of indirection: instead of directly calling the C function, the method-wrapper object calls a generic handler function for the particular sort of slot function that you are calling, and that generic handler calls the actual function. The generic handler handles all of the Python-level bookkeeping, because the slot functions themselves are only expecting to be called inside the guts of the interpreter. (If you want to poke at a method-wrapper object, many of the attributes of a slot wrapper object are method-wrapper objects.) The C function that corresponds to (Just to confuse everyone, a 'built-in method' object is not the same as a 'method-wrapper' object, although they do more or less the same thing.) People who want to see how this particular sausage is made can look
into |
These are my WanderingThoughts GettingAround This is part of CSpace, and is written by ChrisSiebenmann. * * * Atom feeds are available; see the bottom of most pages. Categories: links, linux, programming, python, snark, solaris, spam, sysadmin, tech, unix, web |