survives today in pretty much all the table lamps you buy

Actually you don't find this type of switch on table lamps in the UK. I remember being quite confused when I first encountered one in the USA, and of course I didn't immediately discover that the light got brighter if I turned it a second and third time.

Anyway, I remember light switches in my grandparent's house that probably dated back to about 1920 and had been put in to replace the gas lamps that were in fact still in place (maybe even operating - I remember seeing that somewhere*) at the time I'm recalling. The casing and knob on that old electric switch had been cast just like the gas tap on the gas lamp and I suspect they were all like that in the early days of domestic electicity installation - just automatically made like the familiar ones for the gas lamps, so they were turned on just like y'all's table lamps are still today.

* The gas lamps had delicate and fragile porcelain mantles, shaped like a thimble, that glowed brilliant white fading to yellow around the edges. They were always breaking it seems to me, but darned if I can track the memory down to a specific time and place.