Closed GoogleCodeExporter closed 9 years ago
This may not be the only problem here, but Python uses inspect.getmembers method
during help(), which in turn calls hasattr(object, __bases__) to determine if
the
Sentinal instance "sentinel" is a class.
from python hasattr docs:
This is implemented by calling getattr(object, name) and seeing whether it
raises an
exception or not.
so forcing __getattr__ on Sentinel to raise an AttributeException for magic
methods
prevents inspect from drilling into Sentinel with getclasstree, but is this
defeating
the purpose of a Sentinel?
patch attached.
Original comment by stephene...@gmail.com
on 28 Aug 2009 at 1:34
Attachments:
Fixed in trunk. (Finally.) Not sure when I will do a new release though...
Original comment by fuzzyman
on 3 Jan 2010 at 10:39
Original comment by fuzzyman
on 3 Jan 2010 at 10:39
Original issue reported on code.google.com by
stephene...@gmail.com
on 27 Aug 2009 at 9:29