I'm trying to do the following, but it's not working:
agreements = getEligibleAndActiveAgreements(username).eligibleAgreements
for a function which returns 2 results. I don't want to assign a general variable first, like result = .., and then check result.eligibleAgreements, I want to quickly assign on the same line to a specific variable from just one return.
def getEligibleAndActiveAgreements(username):
...
return eligibleAgreements, activeAgreements
Error for getEligibleAndActiveAgreements(username).eligibleAgreements
AttributeError: 'tuple' object has no attribute 'eligibleAgreements'
Error for getEligibleAndActiveAgreements(username)['eligibleAgreements']
TypeError: tuple indices must be integers or slices, not str