I first heard this statement from my friend and counseling mentor, Tim Jones when I first opened my practice. Tim shared that it was from the AA program. This came up when he asked me what I told couples (in couples / marital counseling) when they asked what they should expect of the other. I remember beaming as I proudly shared what I told my clients; "expect an expenditure of effort and degree of improvement approximately proportional to your own!" Tim's response was "that's terrible therapeutic advise". Tim said "tell them to expect nothing". He went on to explain having expectations is a sure way to be unhappy. He suggested it was better and healthier to replace expectations with hope. Then if your hopes are attained you feel good and if not you feel mostly neutral. If you have expectations about things (or people) and they are met, you are only open to experiencing a neutral emotional state. And if they are not met to feel bad.
The more I think about this, the more powerful and profound it seems. The way we think about things definitely has a HUGE impact on our emotional state. Now, when I work with couples I share the story about the bad advice I used to give. Then I encourage them to let go of expectations, replacing them with hopes. I encourage both to focus on themselves and their own growth and changes in behavior that will help the relationship. I also teach them how to speak to their partner in a respectfully assertive way, sharing their feelings and making requests of the other in a spirit of hope.