Closed yt-ms closed 3 years ago
I agree with it being a method. To me that's much clearer because you are performing an action - locking the workspace - and not accessing a property. I'm now wondering if it should be .lock()
or .lock_workspace()
...
Well - .lock_workspace()
would be consistent with get_workspace()
and put_workspace()
, but it already exists. Not sure whether we want to make it so the only way to lock/unlock is through a context manager.
No, you're right. It's better if those methods continue to exist separately.
Checklist
Is your feature related to a problem? Please describe it.
Currently, you can lock a workspace with syntax like this:
This is cool, but a little unintuitive that it's actually taking a lock out. I think it would be better to be more explicit about what's going on:
I can't decide whether it is better to have
lock
as a method or a property, but am leaning toward method as shown.