I just upgrade to 2.6.4 from 2.5.4 on my Freebsd system and am having a weird issue. I have a variable called 'self.name' and I initialize it to None. Right after I print 'self.name == None' and it says that it's false! I then print 'type(self.name)' before initializing it and it says 'str'. Is self.name a new class attribute? perhaps in threading.Thread that can't be overridden?
You shouldn't use the == operator when comparing with None, always use the is operator instead. Using the == operator on None can lead to quirky behavior.
Anyway, that's beside the point, since yes, threading.Thread objects do have a name attribute, read this for more information on that. It's used to identify the name of the thread. I'd simply use a different name for that property.
Wow I changed my sig!
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks