3 ms·
In python you can expose and integer within a class and later, when the API changes, convert that exposed integer to a property which upon access invokes a func
by dazzawazza 16y ago
In python you can expose and integer within a class and later, when the API changes, convert that exposed integer to a property which upon access invokes a function call. I love this and wish c++ had it. It allows for a much more fluid evolution of the codebase.
for more info see here[1], official docs here [2]
[1]http://adam.gomaa.us/blog/2008/aug/11/the-python-property-builtin/ http://adam.gomaa.us/blog/2008/aug/11/the-python-property-bu...
[2]http://docs.python.org/library/functions.html#property http://docs.python.org/library/functions.html#property