You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# code from xyz# b = {'hi': 'world'}fromxyzimportba=b.values()
We would observe the symbol as xyz.b.values but I don't think we'll know that b has a valid symbol values. In this case we should maybe state that once we get to the end of our chain of attributes, then we stop looking. The length of the chain depends on the type of symbol: modules can have as many as needed, functions zero, constants zero, classes one. We could handle this if we knew that b was a dict, but we'd have to have that metadata in hand. And that could be very difficult if we got b from a function where the return type could be anything.
The text was updated successfully, but these errors were encountered:
That approach does produce a nasty blind spot, where we don't see changes in type (for instance b moves from dict to list) as API changes, although that would certainly break the example code and need to be pinned accordingly.
For example
We would observe the symbol as
xyz.b.values
but I don't think we'll know thatb
has a valid symbolvalues
. In this case we should maybe state that once we get to the end of our chain of attributes, then we stop looking. The length of the chain depends on the type of symbol: modules can have as many as needed, functions zero, constants zero, classes one. We could handle this if we knew thatb
was a dict, but we'd have to have that metadata in hand. And that could be very difficult if we gotb
from a function where the return type could be anything.The text was updated successfully, but these errors were encountered: