Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Instances don't know their arguments #142

Open
pylint-bot opened this issue Jul 3, 2015 · 1 comment
Open

Instances don't know their arguments #142

pylint-bot opened this issue Jul 3, 2015 · 1 comment
Assignees
Labels

Comments

@pylint-bot
Copy link

Originally reported by: Claudiu Popa (BitBucket: PCManticore, GitHub: @PCManticore)


#!python

class A:
    def __init__(self, first, second):
         self.first = first
         self.second = second
a = A(1, 2)
a.first # infer it as 1

@PCManticore PCManticore self-assigned this Feb 27, 2016
@brycepg
Copy link
Contributor

brycepg commented Feb 1, 2018

Note that

class A:
    def __init__(self):
        self.first = 1
A().first

Is inferrable (Only paramaterized attributes are not inferable)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants