0

以下代码失败(ValueError: too many values to unpack , under pycassaShell)
有什么方法可以漂亮地打印超列吗?

cf = pycassa.ColumnFamily(pool, 'Super1')
res = cf.get_range()
for key, col in res:
    print '\n\n', key, ':'
    for k, c in col:
        print k, '=>', c
4

1 回答 1

0

像这样

cf = pycassa.ColumnFamily(pool, 'Super1')
res = cf.get_range()
for key, col in res:
    print '\n\n', key, ':'
    for i in col.keys():
        print i, '=>', col[i]
于 2012-05-19T07:43:30.367 回答