Re: ObjectWrapper subclasses always callable

PJ Eby <pje-Wh6+Hckhi6HFNGf7iClzIwC/[email protected]> Wed, 23 May 2012 11:23:28 -0400
Newsgroups gmane.comp.python.peak
Message-ID <CALeMXf6LZzDzpLyATxWG09ynGZ1MNho1hZChzHwUWuDzVkRvAQ@mail.gmail.com>
--===============1122237370==
Content-Type: multipart/alternative; boundary=f46d0438909398d47a04c0b5b70e

--f46d0438909398d47a04c0b5b70e
Content-Type: text/plain; charset=ISO-8859-1

On May 23, 2012 10:39 AM, "Marcin Tustin" <[email protected]> wrote:
>
> I've found that instances of ObjectWrapper (and any subclasses) are
always callable (the callable function returns True), notwithstanding that
the __subject__ is not callable. Is there a way to remedy this?
>
> I've tried deleting the __call__ method, creating empty slots, creating
my own call method, then trying to delete, using del or delattr on the
subclass object, and creating a custom __getattribute__, all to no avail.

Which Python version are you using?

--f46d0438909398d47a04c0b5b70e
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

<p><br>
On May 23, 2012 10:39 AM, &quot;Marcin Tustin&quot; &lt;<a href=3D"mailto:m=
[email protected]">[email protected]</a>&gt; wrote:<br>
&gt;<br>
&gt; I&#39;ve found that instances of ObjectWrapper (and any subclasses) ar=
e always callable (the callable function returns True), notwithstanding tha=
t the __subject__ is not callable. Is there a way to remedy this?<br>
&gt;<br>
&gt; I&#39;ve tried deleting the __call__ method, creating empty slots, cre=
ating my own call method, then trying to delete, using del or delattr on th=
e subclass object, and creating a custom __getattribute__, all to no avail.=
=A0</p>

<p>Which Python version are you using?</p>

--f46d0438909398d47a04c0b5b70e--

--===============1122237370==
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

_______________________________________________
PEAK mailing list
[email protected]
http://www.eby-sarna.com/mailman/listinfo/peak
--===============1122237370==--