Bug 348026 - class varaibles are not recognized as default values in method definition
Summary: class varaibles are not recognized as default values in method definition
Status: RESOLVED DUPLICATE of bug 363999
Alias: None
Product: kdev-python
Classification: Developer tools
Component: Language support (show other bugs)
Version: 1.7.1
Platform: Other Linux
: NOR normal
Target Milestone: ---
Assignee: Sven Brauch
URL: http://i.imgur.com/d0jHl7Q.png
Keywords:
Depends on:
Blocks:
 
Reported: 2015-05-20 18:49 UTC by Hai Zaar
Modified: 2016-06-13 07:06 UTC (History)
0 users

See Also:
Latest Commit:
Version Fixed In:


Attachments
attachment-15167-0.html (1.37 KB, text/html)
2015-05-20 18:58 UTC, Hai Zaar
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Hai Zaar 2015-05-20 18:49:12 UTC
Consider the following snippet:

class A:
    foo = 1

    def bar(self, bar=foo):
        pass

on def... line, foo will be shown with error saying "Undefined variable: foo".

Thanks,
Zaar
Verified on latest build from 1.7.1-py3 branch with kdevelop 4.7.1

Reproducible: Always
Comment 1 Sven Brauch 2015-05-20 18:56:41 UTC
Probably related to me not even knowing you could do this. ;)
Thanks for the report.
Comment 2 Hai Zaar 2015-05-20 18:58:13 UTC
Created attachment 92739 [details]
attachment-15167-0.html

Funny,

Just recently learned about this myself :)

On Wed, May 20, 2015 at 9:56 PM, Sven Brauch <mail@svenbrauch.de> wrote:

> https://bugs.kde.org/show_bug.cgi?id=348026
>
> Sven Brauch <mail@svenbrauch.de> changed:
>
>            What    |Removed                     |Added
>
> ----------------------------------------------------------------------------
>      Ever confirmed|0                           |1
>              Status|UNCONFIRMED                 |CONFIRMED
>
> --- Comment #1 from Sven Brauch <mail@svenbrauch.de> ---
> Probably related to me not even knowing you could do this. ;)
> Thanks for the report.
>
> --
> You are receiving this mail because:
> You reported the bug.
>
Comment 3 Sven Brauch 2016-06-13 07:06:16 UTC

*** This bug has been marked as a duplicate of bug 363999 ***