Exemple #1
0
 public object __copy__(CodeContext /*!*/ context)
 {
     if (GetType() == typeof(deque))
     {
         deque res = new deque(_maxLen);
         res.extend(((IEnumerable)this).GetEnumerator());
         return(res);
     }
     else
     {
         return(PythonCalls.Call(context, DynamicHelpers.GetPythonType(this), ((IEnumerable)this).GetEnumerator()));
     }
 }
Exemple #2
0
 public object __copy__(CodeContext/*!*/ context) {
     if (GetType() == typeof(deque)) {
         deque res = new deque(_maxLen);
         res.extend(((IEnumerable)this).GetEnumerator());
         return res;
     } else {
         return PythonCalls.Call(context, DynamicHelpers.GetPythonType(this), ((IEnumerable)this).GetEnumerator());
     }
 }