You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Firestore] WriteBatch doesn't return instance so you cannot chain. #6548
I would suggest that the "Pythonic" way to provide multiple operations would be to make WriteBatch a context manager, invoking commit from within its __exit__. E.g.:
Activity
tseaver commentedon Nov 16, 2018
We pretty much never do chaining in Python libs.
tseaver commentedon Nov 26, 2018
I would suggest that the "Pythonic" way to provide multiple operations would be to make
WriteBatcha context manager, invokingcommitfrom within its__exit__. E.g.:I'm surprised that it doesn't already operate this way.
Enable use of 'WriteBatch' as a context manager. (#6912)
Enable use of 'WriteBatch' as a context manager. (#6912)