MCPcopy Create free account
hub / github.com/bslatkin/effectivepython / log

Function log

example_code/item_036.py:54–55  ·  view source on GitHub ↗
(message, when=datetime.now())

Source from the content-addressed store, hash-verified

52from datetime import datetime
53
54def log(message, when=datetime.now()):
55 print(f"{when}: {message}")
56
57log("Hi there!")
58sleep(0.1)

Callers 1

item_036.pyFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected