__slots__, setattr, __metaclass__

R

Roman Yakovenko

Hi. I have small problem and I don't know solution.
The problem: every class imported from some module X should not allow to be modified
( modified == adding or deleting new class attributes ).
Small explanation about what I am doing: I has complex dll written in Managed C++ for C#.
I am using "Python for .NET" and python unittest module to test my dll.
I find myself often make a mistake in attributes names. I'd like to protect my self from those errors.
In subject I listed available options, but I don't know which one to pick and how to use it in my situation.

As you can guess I can't to modify Managed C++ sources.

Thanks. Roman.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Similar Threads


Members online

Forum statistics

Threads
473,766
Messages
2,569,569
Members
45,043
Latest member
CannalabsCBDReview

Latest Threads

Top