Did you mean: limit (tan (x ),x ,pi /2 ,div ="-")?
limit (tan (x),x,pi /2,dir ="-")
Experiment with SymPy at SymPy Live.