On Wed, Jan 1, 2014 at 11:43 AM, Keith Winston wrote:
> Thanks Danny, I don't understand the re-persisted part, but I'll look into
> it.
Shelf.close calls Shelf.sync to flush the cache. Here's what it does:
>>> print(inspect.getsource(shelve.Shelf.sync))
def sync(self):
i
On Wed, Jan 01, 2014 at 02:49:17PM +0100, spir wrote:
> On 01/01/2014 01:26 AM, Steven D'Aprano wrote:
> >On Tue, Dec 31, 2013 at 03:35:55PM +0100, spir wrote:
[...]
> I take the opportunity to add a few features, but would do
> without Source altogether if it were not for 'i'.
> The reason is: it
On 01/01/2014 16:43, Keith Winston wrote:
Thanks Danny, I don't understand the re-persisted part, but I'll look
into it. I realized I hadn't done enough homework to justify a question
right after I sent the first half of that one! Happy New Year!
You do infinitely more work than some who pose
Thanks Danny, I don't understand the re-persisted part, but I'll look into
it. I realized I hadn't done enough homework to justify a question right
after I sent the first half of that one! Happy New Year!
___
Tutor maillist - Tutor@python.org
To unsubsc
On 01/01/2014 01:26 AM, Steven D'Aprano wrote:
On Tue, Dec 31, 2013 at 03:35:55PM +0100, spir wrote:
Hello,
I don't remember exactly how to do that. As an example:
class Source (str):
__slots__ = ['i', 'n']
def __init__ (self, string):
self.i = 0 # current m
On 01/01/2014 08:04, Danny Yoo wrote:
My point was: `iter` the func exists in python (built-in with '-'), one may
use it at times. Giving an application var this name hides, which
accosionnally leads to bugs. I have been bitten by such a bug more than once
in the past, and once hard to find, asp.
> My point was: `iter` the func exists in python (built-in with '-'), one may
> use it at times. Giving an application var this name hides, which
> accosionnally leads to bugs. I have been bitten by such a bug more than once
> in the past, and once hard to find, asp. with the built-in func `range`