Warnings
- warn
from warnings import warn
def foo():
warn("foo will be deprecated soon. Use bar() instead", DeprecationWarning)
print("foo still works")
def main():
foo()
print("afterfoo")
main()
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
from warnings import warn
def foo():
warn("foo will be deprecated soon. Use bar() instead", DeprecationWarning)
print("foo still works")
def main():
foo()
print("afterfoo")
main()