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

property decorator -> redefinition of function #114

Closed
pyflakes-bot opened this issue Jul 19, 2011 · 5 comments
Closed

property decorator -> redefinition of function #114

pyflakes-bot opened this issue Jul 19, 2011 · 5 comments

Comments

@pyflakes-bot
Copy link

Original report by cassapanco on Launchpad:


Code from: http://docs.python.org/library/functions.html#property

foo.py

class C(object):
    def __init__(self):
        self._x = None

    @property
    def x(self):
        """I'm the 'x' property."""
        return self._x

    @x.setter
    def x(self, value):
        self._x = value

    @x.deleter
    def x(self):
        del self._x

pyflakes output is

$ pyflakes foo.py
foo.py:11: redefinition of function 'x' from line 6
foo.py:15: redefinition of function 'x' from line 11

@pyflakes-bot
Copy link
Author

Original comment by kamil.paral on Launchpad:


I can confirm this problem.

@pyflakes-bot
Copy link
Author

Original comment by kisielk on Launchpad:


There's a patch in a pending pull request on the kevinw/pyflakes fork on github that addresses this issue:

https://github.com/ervandew/pyflakes/commit/b971f2775500b4154619dc5d71ba77fc7e4efdf6

@pyflakes-bot
Copy link
Author

Original comment by exarkun (@exarkun?) on Launchpad:


The feature seems questionable to me. However, it would be easier to evaluate the implementation if there were unit tests for the change.

@pyflakes-bot
Copy link
Author

Original comment by glyph on Launchpad:


It looks like this was fixed - inadvertently perhaps? - by http://bazaar.launchpad.net/~divmod-dev/divmod.org/trunk/revision/2685.

@pyflakes-bot
Copy link
Author

Original comment by mestrelion on Launchpad:


Any news on when this fix will be released in Ubuntu?

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

No branches or pull requests

1 participant