[IPython-dev] [Fwd: [afayolle at debian.org: Bug#374625: python2.3-ipython: help built-in function does not work]]

Ville Vainio vivainio at gmail.com
Thu Aug 10 15:08:25 EDT 2006


On 8/10/06, Ville Vainio <vivainio at gmail.com> wrote:

> It's a hard call, but I guess this is functionality we *could* afford
> to lose, esp. if it fixes inspect.py problems. I'll still try to make
> this work though.

I think it works now (fm3.diff, attached. Please apply against HEAD,
not fm2.diff).

FakeModule now "forwards" all getattr calls to the dictionary it was
instantiated with:

     def __getattr__(self,key):
-        try:
-            return self.__dict__[key]
-        except KeyError, e:
-            raise AttributeError("FakeModule object has no attribute %s" % e)
-
+       try:
+           return self.__origdict[key]
+       except KeyError, e:
+           raise AttributeError("FakeModule object has no attribute %s" % e)
+

If everything goes w/o a hitch tomorrow I think I'll push this to
trunk for the unwary users :-).

-- 
Ville Vainio - vivainio.googlepages.com
vainio.blogspot.com - g[mail | talk]='vivainio'
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fm3.diff
Type: text/x-patch
Size: 7053 bytes
Desc: not available
URL: <http://mail.python.org/pipermail/ipython-dev/attachments/20060810/69515df2/attachment.bin>


More information about the IPython-dev mailing list