This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author gvanrossum
Recipients christian.heimes, georg.brandl, gvanrossum
Date 2007-11-26.19:04:01
SpamBayes Score 0.0044642817
Marked as misclassified No
Message-id <1196103842.79.0.269157789666.issue1497@psf.upfronthosting.co.za>
In-reply-to
Content
OK. Some code review comments:

- Please clean up the comment in classobject.c starting with "Method
objects are used for one purposes:" -- to begin with, "one purposes" is
ungrammatical.  Best to remove the (a) bullet and rephrase the whole
thing more like "Method objects are used for bound instance methods (...)"

- The error "unbound methods are not supported" sounds a bit strange;
better rephrase more positive as "self must not be None"

- There is still a comment left "No, it is an unbound method". Is this
code still reachable? I though all ways to set im_self to NULL/None are
blocked?

- Is bug 1202533 still worth testing for in test_descr.py?  I don't know
that using a lambda reproduces the error condition that once existed.


Functional suggestions:

- Do we really need im_class for anything any more?  ISTM that the one
place where it is still used (in method_repr), we could as well use the
class of im_self.  (And before you think of super() as a
counter-argument: super() passes the object's class in rather than the
class where the method is found (though this may be considered a bug).

- I think that, like func_code -> __code__, the im_xxx attributes should
be renamed __xxx__.

The 'new' module claims to exist solely for backwards compatibility.  If
that's true, why are we adding to it?  In any case, the
_BoundCFunction() class is redundant -- you can just use the "method"
type, which is easily accessed as any bound method's __class__
attribute.  And is there a use case for an *unbound* C function? If not,
you could replace boundcfunction() with just a call to the method type.
History
Date User Action Args
2007-11-26 19:04:03gvanrossumsetspambayes_score: 0.00446428 -> 0.0044642817
recipients: + gvanrossum, georg.brandl, christian.heimes
2007-11-26 19:04:02gvanrossumsetspambayes_score: 0.00446428 -> 0.00446428
messageid: <1196103842.79.0.269157789666.issue1497@psf.upfronthosting.co.za>
2007-11-26 19:04:02gvanrossumlinkissue1497 messages
2007-11-26 19:04:01gvanrossumcreate