Re: [PATCH v2 07/16] qapi/expr.py: Add casts in a few select cases

2020-11-18 Thread Markus Armbruster
John Snow writes: > Casts are instructions to the type checker only, they aren't "safe" and > should probably be avoided in general. In this case, when we perform > type checking on a nested structure, the type of each field does not > "stick". > > We don't need to assert that something is a str

[PATCH v2 07/16] qapi/expr.py: Add casts in a few select cases

2020-10-26 Thread John Snow
Casts are instructions to the type checker only, they aren't "safe" and should probably be avoided in general. In this case, when we perform type checking on a nested structure, the type of each field does not "stick". We don't need to assert that something is a str if we've already checked that i