
Did pylint's support for collections.namedtuple regress, or am I doing something silly? This code shows what I'm talking about: #!/usr/local/cpython-3.5/bin/python3 # pylint: disable=superfluous-parens '''Test if pylint can see into namedtuples yet''' from __future__ import print_function import collections class SimpleClass(object): '''Just a container: used to test if pylint sees we have no jkl member''' def __init__(self): self.abc = 5 self.ghi = 6 def main(): '''Main function''' named_tuple = collections.namedtuple('named_tuple', field_names='abc ghi') named_tuple.abc = 5 named_tuple.ghi = 6 print(named_tuple.abc) print(named_tuple.ghi) # This tracebacks, without a pylint warning print(named_tuple.jkl) simple_class = SimpleClass() print(simple_class.abc) print(simple_class.ghi) # pylint catches this one! print(simple_class.jkl) main() I'm using: $ /usr/local/cpython-3.5/bin/pylint --version No config file found, using default configuration pylint 1.5.4, astroid 1.4.4 Python 3.5.0 (default, Feb 8 2016, 13:56:41) [GCC 4.8.4] Should I be doing something differently? If it is a bug, where should I report it? I googled for about twenty minutes trying to find The Right Place, but came up with nothing. Thanks for the great tool! -- Dan Stromberg

Hi Dan, FYI, your posts to this will be moderated as we've dealt with spam in the past from non-members. As such there will likely be a lag between when you send the message, when I'm notified, and when I have the time (and am at a computer) to approve it. Please be patient :) On Mon, Apr 18, 2016 at 6:40 PM, Dan Stromberg <strombrg@gmail.com> wrote:
Did pylint's support for collections.namedtuple regress, or am I doing something silly?
Did it regress in what way?
This code shows what I'm talking about:
#!/usr/local/cpython-3.5/bin/python3
# pylint: disable=superfluous-parens
'''Test if pylint can see into namedtuples yet'''
from __future__ import print_function
import collections
class SimpleClass(object): '''Just a container: used to test if pylint sees we have no jkl member''' def __init__(self): self.abc = 5 self.ghi = 6
def main(): '''Main function''' named_tuple = collections.namedtuple('named_tuple', field_names='abc ghi') named_tuple.abc = 5 named_tuple.ghi = 6 print(named_tuple.abc) print(named_tuple.ghi) # This tracebacks, without a pylint warning print(named_tuple.jkl)
simple_class = SimpleClass() print(simple_class.abc) print(simple_class.ghi) # pylint catches this one! print(simple_class.jkl)
main()
I'm using:
$ /usr/local/cpython-3.5/bin/pylint --version No config file found, using default configuration pylint 1.5.4, astroid 1.4.4 Python 3.5.0 (default, Feb 8 2016, 13:56:41) [GCC 4.8.4]
Should I be doing something differently?
If it is a bug, where should I report it? I googled for about twenty minutes trying to find The Right Place, but came up with nothing.
https://github.com/PyCQA/pylint or https://github.com/PyCQA/astroid would be the places to file bugs if you know where the problem exists. Cheers, Ian

Hi Ian. I resent my message from another account, which I subscribed. Thanks. On Mon, Apr 18, 2016 at 5:19 PM, Ian Cordasco <graffatcolmingov@gmail.com> wrote:
Hi Dan,
FYI, your posts to this will be moderated as we've dealt with spam in the past from non-members. As such there will likely be a lag between when you send the message, when I'm notified, and when I have the time (and am at a computer) to approve it. Please be patient :)
On Mon, Apr 18, 2016 at 6:40 PM, Dan Stromberg <strombrg@gmail.com> wrote:
Did pylint's support for collections.namedtuple regress, or am I
doing
something silly?
Did it regress in what way?
This code shows what I'm talking about:
#!/usr/local/cpython-3.5/bin/python3
# pylint: disable=superfluous-parens
'''Test if pylint can see into namedtuples yet'''
from __future__ import print_function
import collections
class SimpleClass(object): '''Just a container: used to test if pylint sees we have no jkl member''' def __init__(self): self.abc = 5 self.ghi = 6
def main(): '''Main function''' named_tuple = collections.namedtuple('named_tuple', field_names='abc ghi') named_tuple.abc = 5 named_tuple.ghi = 6 print(named_tuple.abc) print(named_tuple.ghi) # This tracebacks, without a pylint warning print(named_tuple.jkl)
simple_class = SimpleClass() print(simple_class.abc) print(simple_class.ghi) # pylint catches this one! print(simple_class.jkl)
main()
I'm using:
$ /usr/local/cpython-3.5/bin/pylint --version No config file found, using default configuration pylint 1.5.4, astroid 1.4.4 Python 3.5.0 (default, Feb 8 2016, 13:56:41) [GCC 4.8.4]
Should I be doing something differently?
If it is a bug, where should I report it? I googled for about twenty minutes trying to find The Right Place, but came up with nothing.
https://github.com/PyCQA/pylint or https://github.com/PyCQA/astroid would be the places to file bugs if you know where the problem exists.
Cheers, Ian
-- Dan Stromberg
participants (2)
-
Dan Stromberg
-
Ian Cordasco