Skip to content

Instantly share code, notes, and snippets.

View ofek's full-sized avatar

Ofek Lev ofek

View GitHub Profile
@datagrok
datagrok / gist:2199506
Last active April 8, 2023 17:36
Virtualenv's `bin/activate` is Doing It Wrong
import sys
import inspect
import re
def called_with_wrong_args(func, locals=None, exc_info=None):
"""
Finds out whether an exception was raised because invalid arguments were passed to a function.