[prev in list] [next in list] [prev in thread] [next in thread]
List: kde-bugs-dist
Subject: [kdev-python] [Bug 379961] New: Wrong type for 'or' operator expression
From: Nicolás Alvarez <bugzilla_noreply () kde ! org>
Date: 2017-05-18 3:43:18
Message-ID: bug-379961-17878 () http ! bugs ! kde ! org/
[Download RAW message or body]
https://bugs.kde.org/show_bug.cgi?id=379961
Bug ID: 379961
Summary: Wrong type for 'or' operator expression
Product: kdev-python
Version: git master
Platform: Debian testing
OS: Linux
Status: UNCONFIRMED
Severity: minor
Priority: NOR
Component: Language support
Assignee: mail@svenbrauch.de
Reporter: nicolas.alvarez@gmail.com
Target Milestone: ---
According to the Python documentation, "The expression "x or y" first evaluates
x; if x is true, its value is returned; otherwise, y is evaluated and the
resulting value is returned."
However, kdev-python thinks 'or' always returns a boolean:
a = "a"
x = a or "foo"
The tooltip indicates 'a' is of type 'str' and 'b' is of type 'bool'. This is
wrong; it should say 'b' is of type 'str'. More generally, the type of 'x or y'
should be 'unsure(type(x), type(y))'.
--
You are receiving this mail because:
You are watching all bug changes.=
[prev in list] [next in list] [prev in thread] [next in thread]
Configure |
About |
News |
Add a list |
Sponsored by KoreLogic