I don't have my copy of Kelley handy but I think in chapter 1 he gives the example where X is a countable disjoint union of open intervals and a countable discrete set while Y is a countable disjoint union of left-closed, right-open intervals and a countable discrete set.The point is that you can get a half closed interval from an open one by attaching an endpoint and you can build an open interval using a sequence of half closed intervals.