Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #6856

Re: Unshelving the data?

Path csiph.com!x330-a1.tempe.blueboxinc.net!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder2.enfer-du-nord.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <awilliam@whitemice.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.001
X-Spam-Evidence '*H*': 1.00; '*S*': 0.00; 'wed,': 0.03; 'system?': 0.07; 'though.': 0.07; 'wrote:': 0.14; 'from:addr:awilliam': 0.16; 'from:addr:whitemice.org': 0.16; 'from:name:adam tauno williams': 0.16; 'hashed': 0.16; 'keyed': 0.16; 'message-id:@linux- yu4c.site': 0.16; 'received:72.14.190': 0.16; 'received:72.14.190.87': 0.16; 'received:mail.wmmi.net': 0.16; 'received:wmmi.net': 0.16; 'reply-to:addr:awilliam': 0.16; 'reply- to:addr:whitemice.org': 0.16; 'shelves.': 0.16; 'simpler.': 0.16; 'cache': 0.16; 'stick': 0.19; 'uncle': 0.19; 'header:In-Reply- To:1': 0.21; 'elegant': 0.23; 'items.': 0.23; 'way?': 0.23; 'subject:data': 0.26; 'received:72.14': 0.26; 'manually': 0.29; 'subject:?': 0.29; 'to:addr:python-list': 0.33; 'list.': 0.33; 'there': 0.35; '-0700,': 0.35; 'store': 0.35; 'could': 0.38; 'but': 0.38; 'subject:: ': 0.38; 'should': 0.39; "i'd": 0.39; 'header:Mime-Version:1': 0.39; 'to:addr:python.org': 0.39; 'more': 0.60; 'full': 0.63; 'header:Reply-To:1': 0.72; 'reply-to:no real name:2**0': 0.72; 'shelving': 0.84
Subject Re: Unshelving the data?
From Adam Tauno Williams <awilliam@whitemice.org>
To python-list@python.org
In-Reply-To <4433955b-7f54-400a-af08-1f58a75e734c@j31g2000yqe.googlegroups.com>
References <4433955b-7f54-400a-af08-1f58a75e734c@j31g2000yqe.googlegroups.com>
Content-Type text/plain; charset="UTF-8"
Date Thu, 02 Jun 2011 06:46:21 -0400
Mime-Version 1.0
X-Mailer Evolution 2.32.1
Content-Transfer-Encoding 7bit
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.12
Precedence list
Reply-To awilliam@whitemice.org
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <http://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <http://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.2389.1307013346.9059.python-list@python.org> (permalink)
Lines 17
NNTP-Posting-Host 82.94.164.166
X-Trace 1307013346 news.xs4all.nl 49183 [::ffff:82.94.164.166]:52619
X-Complaints-To abuse@xs4all.nl
Xref x330-a1.tempe.blueboxinc.net comp.lang.python:6856

Show key headers only | View raw


On Wed, 2011-06-01 at 19:49 -0700, Uncle Ben wrote:
> Shelving is a wonderfully simple way to get keyed access to a store of
> items. I'd like to maintain this cache though.

+1

> Is there any way to remove a shelved key once it is hashed into the
> system?  I could do it manually by removing the value and erasing the
> key in the directory list. But is there a more elegant way?

del shelve[key]

> Or should I to go the full database route?  It is not a lage
> application.

Stick with shelves.  Much simpler.

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Unshelving the data? Uncle Ben <bgreen@nycap.rr.com> - 2011-06-01 19:49 -0700
  Re: Unshelving the data? Chris Torek <nospam@torek.net> - 2011-06-02 03:24 +0000
  Re: Unshelving the data? Ben Finney <ben+python@benfinney.id.au> - 2011-06-02 13:25 +1000
  Re: Unshelving the data? Adam Tauno Williams <awilliam@whitemice.org> - 2011-06-02 06:46 -0400
    Re: Unshelving the data? Uncle Ben <bgreen@nycap.rr.com> - 2011-06-02 06:17 -0700

csiph-web