Hi Sylvain

I haven't looked at the actual code at all but here's my take on what Diez means ...

On 3/02/2010, at 8:43 PM, Sylvain Thénault wrote:

On 02 février 18:42, Diez B. Roggisch wrote:

I think I spotted a bug in pylint (0.18) inside the typechecker module: in the
constructor, this code


        self.generated_members = list(self.config.generated_members)
        if self.config.zope:
          self.generated_members.\
                extend(('REQUEST', 'acl_users', 'aq_parent'))

at this point there are two lists ...

        self.config.generated_members
        self.generated_members

The latter is a copy of the first with possibly extra items

So it appears that the self.generated_members is extended over the
configuration.

However, when later used, the code reads

        if node.attrname in self.config.generated_members:

So... the modified list is ignored. I didn't find a way to file the ticket.

Sorry, I don't see the bug here. The list is modified in-place, so you should
get the extended list.

Here the code is checking the original unextended list, not the newer possibly large list [self.generated_members].

Derek.

_______________________________________________
Python-Projects mailing list
Python-Projects@lists.logilab.org
http://lists.logilab.org/mailman/listinfo/python-projects

Reply via email to