From: Ype K. <yk...@xs...> - 2001-07-16 19:33:23
|
D-, >On Mon, Jul 16, 2001 at 07:37:04PM +0100, Ype Kingma wrote: >| Kevin, >| >| >Is there anyway to find out the type of an object? E.g. >| > >| >>>> a = 1 >| >>>> a.isa(int) >| >1 >| >| Apart from instanceof() (other post) you can also use: > >Heh, too much Java for you too :-). > >'instanceof' is a builtin operator in Java, not Python. <poco a poco piu agitato> Oops :( , I think I have done too much thread scheduling lately: notify(), notifyAll() and wait() have almost the same meaning. This instanceof thing bit me a few times already. Now, who added the colon to the if, while, for, def, class, _and_ try statements? Wasn't that the same guy who designed the Python threads to be "loosely based on Java"? The guy who seems to have said that JPython could not be done? </poco> And all that in _my_ favourite programming language? Ype |