Boost logo

Boost :

From: David Abrahams (abrahams_at_[hidden])
Date: 2001-03-17 08:22:37


Lorien,

I'm fully aware of where the "problem" is, but I am not a Python maintainer.
If you want to have some impact on the Python code, the best thing you can
do is to post a suggestion (or better still, a patch) to a forum that the
Python maintainers watch, like comp.lang.python.

-Dave

----- Original Message -----
From: <l.dunn_at_[hidden]>
To: <boost_at_[hidden]>
Sent: Saturday, March 17, 2001 1:41 AM
Subject: [boost] Re: BPL: inheritance problem

> Hi Dave,
> I've located the point in the python 2.0 code where this occurs:
>
> ceval.c, line 1816 (reformatted for clarity):
>
> /* BEGIN CODE SAMPLE */
>
> else
> {
>
> /* Unbound methods must be called with an instance of the
> class (or a derived class) as first argument */
> if (na > 0 && (self = stack_pointer[-n]) != NULL
> && PyInstance_Check(self)
> && PyClass_IsSubclass((PyObject *)
> ((PyInstanceObject*)self)->in_class), class))
> /* Handy-dandy */ ;
> else
> {
> PyErr_SetString(PyExc_TypeError,
> "unbound method must be called with class
> instance 1st argument");
> x = NULL;
> break;
> }
> }
>
> /* END CODE SAMPLE */
>
>
> Lorien
>
>
> --- In boost_at_y..., "David Abrahams" <abrahams_at_m...> wrote:
>
> > Surely. It was my impression that Python 2.0 was supposed to fix
> this
> > problem, but it looks like I just assumed that it did because they
> fixed the
> > way isinstance and issubclass work. I'm surprised that the
> approach wasn't
> > extended a bit further :-(
> >
> > It would be a relatively easy thing to change in the Python
> source, though
> > I'm not sure what the impact would be. I'm not in the business of
> > maintaining Python, either. Posting a suggestion to
> comp.lang.python
> > wouldn't hurt, if you want to do it.
> >
> > -Dave
>
>
> List-Unsubscribe: <mailto:boost-unsubscribe_at_[hidden]>
>
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/
>
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk