Metaclasses

Shalabh Chaturvedi shalabh at cafepy.com
Wed Dec 22 18:44:20 EST 2004


Bob.Cowdery at CGI-Europe.com wrote:

> I am trying to build a capability based API. That is, an instance of the
> api will reflect the capabilities of some underlying services. 

The question I'd ask at this point is - does the term 'instance of the 
API' correspond to a Python class, or an instance of the class that you 
define? In case you want to have one class per API, you'd have multiple 
classes in which case metaclasses *may* be useful (but still not 
required). In case you want to have one instance per API such that each 
instance has a different set of methods,  you don't need metaclasses at all.

--
Shalabh




More information about the Python-list mailing list