We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
NB: All the methodology will be tested first on stat_tool
Wraps the C++ method in Python. If the method fail, raise the errors. Other else return the result.
from functools import wraps mod = __stat_tool.stat_tool def wrapper(f): @wraps(f) def method(filename): error = __stat_tool.stat_tool.StatError(__stat_tool.stat_tool.nb_error) data = f(error, filename) if not data: raise Exception(str(error)) return data return ascii_read mod.klass.method = wrapper(mod.klass.method)
std::cout
Use a decorator function like:
from functools import wraps mod = __stat_tool.stat_tool def wrapper(f): @wraps(f) def f_comparison(self, other): sstream = mod.std.Ostringstream(mod.std.ios_openmode.S__OUT) f(self, sstream, other) return sstream.str() return f_comparison mod.FrequencyDistribution.f_comparison = wrapper(mod.FrequencyDistribution.f__comparison)