chigga101 at gmail.com
Sat Oct 13 20:29:45 CEST 2012
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
self.att = "testing"
>>> e = Test()
>>> hasattr(e, e.att)
>>> hasattr(e, "testing")
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
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Tutor