Open tristanlatr opened 2 years ago
Here are things that astroid has great support for which we could add to astuce in the future, but not for the first version in my opinion.
For loops and generator expressions:
for a in [1, 2, 3]:
print (a)
for b,c in [(1,2), (3,4)]:
print (b)
print (c)
print ([(d,e) for e,d in ([1,2], [3,4])])
Dict unpack:
base = {'data': 0}
new = {**base, 'data': 1}
new3 = {**base, **new}
I believe that we should adopt clear guidelines about what kind of stuff we want to have support for. Clearly we need first class support for literals, especially list of strings, since IMO it's the whole point of this project: being able to statically resolve
__all__
assignments.But
__all__
is a list, so it can be mutated withappend
,extend
, etc, so I believe we need support forbuiltins
as well.So I'd propose the following goals and no-goals.
Goals:
parse()
method, but the nodes should stay compatible with the standard library one.No-goals: