I have several situations in my code where I want a unique identifier
for a method of some object (I think this is called a bound method). I
want this id to be both unique to that method and also stable (so I can
regenerate it later if necessary).
I thought the id function was the obvious choic
Russell E. Owen wrote:
> The id of two different methods of the same object seems to be the
> same, and it may not be stable either.
Two facts you're (apparently) unaware of are conspiring against you:
1) the "id" of an object is consistent for the lifetime of the object,
but may be reused afte
On Fri, 19 Aug 2005 13:29:19 -0700, "Russell E. Owen" <[EMAIL PROTECTED]> wrote:
>I have several situations in my code where I want a unique identifier
>for a method of some object (I think this is called a bound method). I
>want this id to be both unique to that method and also stable (so I can
Russell E. Owen wrote:
> The "hash" function looks promising -- it prints out consistent values
> if I use it instead of "id" in the code above. Is it stable and unique?
> The documentation talks about "objects" again, which given the behavior
> of id makes me pretty nervous.
>
I dont know how
In article <[EMAIL PROTECTED]>,
Benji York <[EMAIL PROTECTED]> wrote:
>Russell E. Owen wrote:
>> The id of two different methods of the same object seems to be the
>> same, and it may not be stable either.
>
>Two facts you're (apparently) unaware of are conspiring against you:
>
>1) the "id" of
On Fri, 19 Aug 2005 16:33:22 -0700, "Russell E. Owen" <[EMAIL PROTECTED]> wrote:
[...]
>
>The current issue is associated with Tkinter. I'm trying to create a tk
>callback function that calls a python "function" (any python callable
>entity).
>
>To do that, I have to create a name for tk that is
In article <[EMAIL PROTECTED]>,
[EMAIL PROTECTED] (Bengt Richter) wrote:
>On Fri, 19 Aug 2005 16:33:22 -0700, "Russell E. Owen" <[EMAIL PROTECTED]>
>wrote:
>[...]
>>
>>The current issue is associated with Tkinter. I'm trying to create a tk
>>callback function that calls a python "function" (any
Russell E. Owen wrote:
>>>The current issue is associated with Tkinter. I'm trying to create a tk
>>>callback function that calls a python "function" (any python callable
>>>entity).
>>>
>>>To do that, I have to create a name for tk that is unique to my python
>>>"function". A hash-like name would
Russell E. Owen wrote:
> I have several situations in my code where I want a unique identifier
> for a method of some object (I think this is called a bound method). I
> want this id to be both unique to that method and also stable (so I can
> regenerate it later if necessary).
>>> def persistent_
In article <[EMAIL PROTECTED]>,
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
>Russell E. Owen wrote:
>
The current issue is associated with Tkinter. I'm trying to create a tk
callback function that calls a python "function" (any python callable
entity).
To do that, I have to cr
In article <[EMAIL PROTECTED]>,
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
>Russell E. Owen wrote:
>
The current issue is associated with Tkinter. I'm trying to create a tk
callback function that calls a python "function" (any python callable
entity).
To do that, I have to cr
Russell E. Owen wrote:
> Having looked at it again, it is familiar. I copied it when I wrote my
> own code. I avoided using at the time both because the initial
> underscore suggested it was a private method and because it introduces
> an extra function call.
>
> _register has the same weakness th
In article <[EMAIL PROTECTED]>,
"Fredrik Lundh" <[EMAIL PROTECTED]> wrote:
>Russell E. Owen wrote:
>
>> Having looked at it again, it is familiar. I copied it when I wrote my
>> own code. I avoided using at the time both because the initial
>> underscore suggested it was a private method and beca
13 matches
Mail list logo