In most situations the sidewalk is the wrong answer, but the thing with riding a bicycle is that essentially no roads (in the US at least) are designed with bicycles even in mind, and those that are are as often as not designed by people who don't really understand what a cyclist needs.
As a result, one of the primary requirements when riding a bicycle is the ability to judge a situation individually and do what you think is the best/safest thing to do. It's also good to just mind your own business and don't second-guess how others choose to handle a situation.
__________________
Work: the 8 hours that separates bike rides.