LOL. What do you think a code or ordinance is if it's not a law? Does your city have an ordinance regarding open container on public streets? If so, get yourself and beer and walk past a cop on the sidewalk. As he's toting you to jail, please tell him the city ordinance is "unenforceable" and then report back to me his response.
If you read a little closer I was discussing POSITIVE law and not "color of law" which is what characterizes codes and ordinances. Without too much effort on your part, I think you'll find open beer drinking ordinances conform to the state laws regarding such. On the flipside,show me where ordinances, codes, etc. are positive law......don't hold your breath.