On Sat, 18 Sep 2010 07:14:03 pm Roelof Wobben wrote: > P=(Point)
This line does not do what you think it does. Brackets in Python are used for two things, grouping and calling functions. To call a function, or a class, you need to have the brackets *after* the function: P = Point() # what about arguments to the function? If you surround it with brackets, as you do above, it does nothing. It's like this: x = (1+1) # exactly the same as x = 1+1 without brackets > a=0 > b=0 > a=id(P) It is a waste of time to initialise variables immediately before initialising them again. > print a > print b > print P > > But now id is a decimal so I don't can't translate it. id(x) returns an integer. By default, integers always print in decimal, if you want to print them in hex you can do this: hex(id(P)) -- Steven D'Aprano _______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor