[prev in list] [next in list] [prev in thread] [next in thread]
List: kdevelop-bugs
Subject: [Bug 292221] New: Incorrect type collection from and within set comprehension
From: Eike Hein <hein () kde ! org>
Date: 2012-01-22 20:14:52
Message-ID: bug-292221-40295 () http ! bugs ! kde ! org/
[Download RAW message or body]
https://bugs.kde.org/show_bug.cgi?id=292221
Summary: Incorrect type collection from and within set
comprehension
Product: kdev-python
Version: git master
Platform: Compiled Sources
OS/Version: Linux
Status: NEW
Severity: normal
Priority: NOR
Component: general
AssignedTo: kdevelop-bugs@kdevelop.org
ReportedBy: hein@kde.org
CC: svenbrauch@googlemail.com
Given:
foo = {line.strip() for line in file.readlines()}
... kdev-python considers line to be mixed, even though it considers
readlines() to return string. Further, it considers foo to be string, when it
should be set of string. There is also no tooltip for strip() accordingly.
Given:
foo = {line.strip() for line in file.readlines() if line.strip()}
... things become wonkier. Now foo is considered a set of unknown for some
reason.
Of course, things go a bit deeper: readlines() doesn't actually return string
but list of string. (Or, in Python 3, it might return list of bytes if a file
is opened in binary mode.)
--
Configure bugmail: https://bugs.kde.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.
_______________________________________________
KDevelop-bugs mailing list
KDevelop-bugs@kdevelop.org
https://barney.cs.uni-potsdam.de/mailman/listinfo/kdevelop-bugs
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic