Skip to content

Instantly share code, notes, and snippets.

@david-shiko
Last active February 10, 2022 05:01
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save david-shiko/4832cebfe32a062dbde6b391cb018756 to your computer and use it in GitHub Desktop.
Save david-shiko/4832cebfe32a062dbde6b391cb018756 to your computer and use it in GitHub Desktop.
Common python notes
@contextmanager can be used to define a factory function for with statement context managers,
without needing to create a class or separate __enter__() and __exit__() methods.
Mongodb (2022 year) still don't work with dates without time. So datetime.date() will fail opposed to datetime.utcnow(). That's all for today.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment