[Python-Dev] Naming rules for function types

M.-A. Lemburg mal@lemburg.com
Sat, 05 Feb 2000 12:10:46 +0100


Moshe Zadka wrote:
> 
> In Include/object.h, around line 140, many pointer to functions are
> typedef'ed. I need a new function type:
> 
> int (*f)(PyObject *, PyObject *)
> 
> And I'm at a bit of a los what to call it.
> Anyone has any idea what the naming convention is?
> 
> Is objobjproc the right thing?

I'd suggest creating a new type which is related to your particular
need rather than coming up with a new generic name. The generic
names bypass type safety.

Since you probably want this for the __contains__ slot, how
about "containsfunc" ?

-- 
Marc-Andre Lemburg
______________________________________________________________________
Business:                                      http://www.lemburg.com/
Python Pages:                           http://www.lemburg.com/python/