18 using System.Collections.Generic;
21 using System.Collections;
60 protected abstract IEnumerable<Symbol>
GetKeys {
get; }
68 protected abstract IEnumerable<T>
GetValues {
get; }
96 public virtual T
this[
Symbol symbol]
114 public virtual T
this[
string ticker]
132 this[symbol] = value;
160 return fromkeys(sequence,
default(T));
174 var dict =
new PyDict();
175 foreach (var key
in sequence)
177 var pyValue =
get(key, value);
178 dict.SetItem(key.ToPython(), pyValue.ToPython());
222 var pyList =
new PyList();
225 using (var pyKey = key.ToPython())
227 using (var pyValue =
this[key].ToPython())
229 using (var pyObject =
new PyTuple(
new PyObject[] { pyKey, pyValue }))
231 pyList.Append(pyObject);
282 this[symbol] = default_value;
283 return default_value;
294 return pop(symbol,
default(T));
312 return default_value;
327 var dictionary = other.ConvertToDictionary<
Symbol, T>();
328 foreach (var kvp
in dictionary)
330 this[kvp.Key] = kvp.
Value;