New submission from L. Peter Deutsch:
In the following, dir(Node) should include the name 'z', and Node.z
should be 'Node'. However, dir(Node) does not include 'z', and Node.z is
undefined (AttributeError). This is directly contrary to the Python
documentation, whic
L. Peter Deutsch added the comment:
Please reopen this issue as a documentation bug.
The documentation for __new__ in section 3.4.1 says:
__new__() is intended mainly to allow subclasses of immutable types
(like int, str, or tuple) to customize instance creation.
The documentation for
L. Peter Deutsch added the comment:
Actually, "called" and "callable" are OK, if the documentation says
somewhere that the normal effect of "calling" a type object is to invoke
__new__. The places I looked first (sections 3.1, 3.3, and 3.4.1) do not
say this. 5.3
L. Peter Deutsch added the comment:
Sorry, I wrote "E's cached pointer to C.f", which of course should be
"E's cached pointer to A.f".
__
Tracker <[EMAIL PROTECTED]&g
L. Peter Deutsch added the comment:
The proposed approach to speeding up lookup of inherited methods is not
quite sound, given that class attributes can be added and removed
dynamically. Consider:
class A:
def f(x): ...
class B(A):
pass
class C(B):
pass
If C caches a pointer to A.f, the
L. Peter Deutsch <[EMAIL PROTECTED]> added the comment:
Having now read messages 63380 and 63384, I agree with them: I would
have withdrawn my proposal if it hadn't gotten rejected first. I do have
a use case, but the workaround is pretty easy.
__
New submission from L. Peter Deutsch:
I've read a number of reports of exponential-time regexp matching, but this
regexp uses no unusual features, requires no backtracking, and only loops
"forever" on certain input strings.
I listed the Python version # as 2.6; I actual
L. Peter Deutsch added the comment:
It never occurred to me that the regexp package would be so poorly designed
that a pattern that so clearly never requires backtracking could require
exponential time. I'll change the pattern (taking out the + has no effect on
what strings it matches