im trying to understand this hasattr function. i am supposed to pass in an object and an attribute name into its parametres... so im trying to get it to return True. Here's a quick test
class Test: def __init__(self): self.att = "testing" >>> e = Test() >>> hasattr(e, e.att) False >>> hasattr(e, "testing") False what can i do to make this True? my e object has an attribute att but it returns False. Any code showing it return True? the task i have been set is very difficult but i don't want to ask for help just yet, i think understanding how hasattr works might make everything else clear.
_______________________________________________ Tutor maillist - Tutor@python.org To unsubscribe or change subscription options: http://mail.python.org/mailman/listinfo/tutor