In Python's 2.5's case, the object passed to with must implement a special protocol (including enter and exit methods), so the with statement cannot be used like Ruby's general-purpose, lightweight blocks.
Synchronize is a normal Ruby method.