On 04 janvier 08:08, Chris Torek wrote:
> I don't know if any of this is needed for later versions of python,
> but I have an old Python 2.5 installation, and running pylint on
> code using __new__ instead of __init__ in class definitions
> resulted in complaints like this:
[snip] 
> Here's the (rather lightly tested -- I ran it over more than
> just the above example, but not over a lot of code) patch.

Nice :) I've checked in a slightly improved version of your patch which
suffered from two problems:

* infer_call_result should actually return an Instance of the class, not
  the class itself
* it should fallback to _proxied.infer_call_result if the 'if' branch is
  not matched.

Also, I've added some basic test based on your example.

Good work anyway, thanks a lot.
-- 
Sylvain Thénault                               LOGILAB, Paris (France)
Formations Python, Debian, Méth. Agiles: http://www.logilab.fr/formations
Développement logiciel sur mesure:       http://www.logilab.fr/services
CubicWeb, the semantic web framework:    http://www.cubicweb.org

_______________________________________________
Python-Projects mailing list
[email protected]
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to