Evaluation of game objects (for string matches etc)

currently I believe you cannot say
if (game.something) contains (self.whatever)
it would be good if any right hand side of an equation could use attributes/functions not just string values
also it would be good to be able to set game attributes to evaluate to actors eg
self.id = 5
game.whatever = self
game.some_id = Actor(game.whatever).id
if (game.something) contains (self.whatever)
it would be good if any right hand side of an equation could use attributes/functions not just string values
also it would be good to be able to set game attributes to evaluate to actors eg
self.id = 5
game.whatever = self
game.some_id = Actor(game.whatever).id