use with when calling TFRecordWriter (#14497)
TFRecordWriter supports __enter__ and __exit__ . Calling it through with is more pythonic and does cleanup in case something throws an uncaught exception.
Loading
Please sign in to comment
TFRecordWriter supports __enter__ and __exit__ . Calling it through with is more pythonic and does cleanup in case something throws an uncaught exception.