That refers to Dante, I suppose, the scripture over the entry to hell.
The interesting thing is, it is claimed that Dante mixed up his travel notes from which he transcribed the final version. The common publication in Italian orginal is
Voi che entrate, abbandonate ogni speranza - You who enter, abandon all hope.
But what the poet in truth wanted to write there, according to his notes, was this
:
Lasciare andare ogni speranza e poi entrare - (First) Let go all hope, and
then enter.
He who has no hope in his heart, cannot get disappointed or desperate, but he could get royally surprised.
I speak no Italian, I know these described facts, but used a reverse transalation by DppL to come to the Italian lines. But if memory does not completely fool me, they sound indeed like what I seem to recall. I first read about it in a book by Watzlawick, and then later again somewhere else, online.