Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(3)  |  Call(2)  |  Derive(0)  |  Import(1)

src/p/y/pylearn2-HEAD/pylearn2/utils/tests/test_key_aware.py   pylearn2(Download)
from pylearn2.utils.key_aware import KeyAwareDefaultDict
 
 
def test_key_aware_default_dict():
    a = KeyAwareDefaultDict(str)
    assert a[5] == '5'
    assert a[4] == '4'
    assert a[(3, 2)] == '(3, 2)'
    try:
        b = KeyAwareDefaultDict()