|Subject:||Add it, or at least add a warning|
I'd agree that anywhere that someone is likely to cut and paste from should have decent error checking. If this gets in the way of teaching something, then remove the error checking, but add an icon, or a note about "Fragile code ahead", a heavy border to the example code. You get the idea.
Hear us Roar