On 7/20/10 11:39 AM, dmitrey wrote:
e.g. one that just looks in the object's dictionary so as to avoid returning
true for properties or other such fancy attributes.
So can anyone explain me how to look into object's dict? As I have
wrote, "something in dir(...)" requires O(numOfFields) while I would
like to use o(log(n))
('size' in obj.__dict__) is O(1) with a pretty low constant.
--
Robert Kern
"I have come to believe that the whole world is an enigma, a harmless enigma
that is made terrible by our own mad attempt to interpret it as though it had
an underlying truth."
-- Umberto Eco
--
http://mail.python.org/mailman/listinfo/python-list