Results 8 comments of kzing

OBJ_ENCODING_QUICKLIST 就是指 OBJ_ENCODING_LINKEDLIST 或者 OBJ_ENCODING_ZIPLIST吧. 根据不同情况来选择, 不应该当做独自的一类?

@wenbochang888 不是很明显的自查了一张表吗... ` if (!dictIsRehashing(d)) return NULL;` 这里如果没在rehashing 直接就return 了

`he = d->ht[table].table[idx]` 这一步是否有值, 就相当于你说的`比较idx 和 rehashidx`了 如果是null, 那就直接查ht[1]了 如果不是 null, 那这的确是**有可能**查两张表 这两者其实是等价的(当然, 如果直接判断idx 和 rehashidx, 会少2步判断(`while(he)` + `dictIsRehashing`...不过..这个影响可以忽略了...)

`idx > rehashidx` => `he = d->ht[table].table[idx] != null` `idx `he = d->ht[table].table[idx] == null` @wenbochang888

## Trick for socket.recv ``` coon = socket.connect(bind_address) msgs = [] # normal way while True: msg = coon.recv(1024) if recv: msgs.append(msg) else: # when no msg come, break break...

## property cache with Descriptor ``` class PropertyCache(object): """ a decorator to cache property """ def __init__(self, func): self.func = func def __get__(self, obj, cls): if not obj: return self...

@brennerm example for the property cache decriptor: ``` class TestClass: @cache_property def property_to_be_cached(self): print('compute') return 'result' ts = TestClass() print 'first time:\n', ts.property_to_be_cached print 'second time:\n', ts.property_to_be_cached ``` and the...