public static object pop(PythonDictionary self, object key, object defaultValue) { //??? perf won't match expected Python perf object ret; if (self.TryGetValueNoMissing(key, out ret)) { self.Remove(key); return(ret); } else { return(defaultValue); } }
public static object pop(PythonDictionary self, object key) { //??? perf won't match expected Python perf object ret; if (self.TryGetValueNoMissing(key, out ret)) { self.Remove(key); return(ret); } else { throw PythonOps.KeyError(key); } }
/// <summary> /// Removes a variable from the local scope. /// </summary> internal bool TryRemoveVariable(string name) { return(Dict.Remove(name)); }