3 ms·
The closest equivalent to `with` from Python would be a higher-order function defined such that it can accept a lambda (i.e. it needs to be a template). Then yo
by int_19h 1y ago
The closest equivalent to `with` from Python would be a higher-order function defined such that it can accept a lambda (i.e. it needs to be a template). Then you'd write something like:
object.batchEvents([&]{
object.setProperties(...);
});
(for bonus points, pass object reference as argument to the lambda)