infinispan / infinispan/python-client
Cache should have dictionary-like syntactic sugar
Đang mở
@galderz đang làm issue này rồi.
Từ ngày 19/4/2011.
- Ngôn ngữ chính
- C++
- Star
- 17
- Fork
- 12
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
The Cache class uses Java Map-style put(), get(), remove() and contains(). Which is fine, but we should also offer Python-style syntactic sugar, so that we can do:
cache['key'] = 'value'
print cache['key']
if 'key' in cache:
print 'Key exists!'
for e in cache:
print e
etc. Have a look at the implementation of a Python map for more details, or one of the many custom map-like classes available for Python.
This is usually implemented by defining internal methods, such as:
def __getitem__(self, key):
return self.get(key)
def __setitem__(self, key, value):
self.put(key, value)
etc.
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Đánh giá
Issue này chưa được đánh giá.