On Sun, 29 Jan 2012 16:18:02 -0600
"Edward K. Ream" <[email protected]> wrote:
> Thanks for this, and the rest of your post. Now that you have
> confirmed the source of the problem, I'll see if there might not be a
> way of associating settings with files that can avoid these
> path-related issues entirely.
That would be good. id(c) might work? Docs. below. Or maybe, to
avoid the (probably miniscule) risk of a c with the same id as a
previously existing c, self.id = id(self)+int(time.time())
c.db uses a hash of the path, but that seems more unavoidable, given
that it's persistent, anyway that's not related to @settings.
Cheers -Terry
id(object)
Return the “identity” of an object. This is an integer (or long
integer) which is guaranteed to be unique and constant for this
object during its lifetime. Two objects with non-overlapping
lifetimes may have the same id() value.
CPython implementation detail: This is the address of the object in
memory.
--
You received this message because you are subscribed to the Google Groups
"leo-editor" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/leo-editor?hl=en.