Jim Fulton wrote:
The only type-safety mechanism for a CObject is it's identity. If you want to make sure you're using the foomodule api, make sure the address of the CObject is the same as the address of the api object exported by the module.
I don't follow that. If you already have the address of the thing you want to use, you don't need a CObject.
2. Only code provided by the module provider should be accessing the CObject exported by the module.
Not following that either. Without attaching some kind of metadata to a CObject, I don't see how you can know whether a CObject passed to you from Python code is one that you created yourself, or by some other unrelated piece of code. Attaching some kind of type info to a CObject and having an easy way of checking it makes sense to me. If the existing CObject API can't be changed, maybe a new enhanced one could be added. -- Greg _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com