When programming in C# I usually write following arguments validation code:
void Process(object item) {
if (item == null) throw ArgumentNullException();
// code
}
Is it 'Pythonic' to do similar validation in Python? I really don't want anybody pass None to Process method. What type of Python Exception should I use? (There are no standard ArgError or something like this)
def Process(item):
if item == None: raise ArgNoneError('item')
# code
Thanks