use set literal instead of big disjunction of literals

This commit is contained in:
Erik Krogh Kristensen
2021-10-26 12:55:25 +02:00
parent db3c99d64d
commit a3c55c2aec
46 changed files with 590 additions and 1259 deletions

View File

@@ -3,11 +3,5 @@ import python
from Value val, string name
where
val = Value::named(name) and
(
name = "bool" or
name = "sys" or
name = "sys.argv" or
name = "ValueError" or
name = "slice"
)
name in ["bool", "sys", "sys.argv", "ValueError", "slice"]
select val, name

View File

@@ -3,19 +3,7 @@ import python
from Object o, string name
where
o.hasLongName(name) and
(
name = "sys.modules"
or
name = "test.n"
or
name = "test.l"
or
name = "test.d"
or
name = "test.C.meth"
or
name = "test.C.cmeth"
or
name = "test.C.smeth"
)
name in [
"sys.modules", "test.n", "test.l", "test.d", "test.C.meth", "test.C.cmeth", "test.C.smeth"
]
select name, o.toString()