Sunday, April 6, 2008

Singletons in Python - Take Three

This is starting to get old quick.

What about wrappers?

Say WaterBlock and WaterBlockImpl.

Then we use the universal metaclass approach and have the wrapper pass the key for WaterBlockImpl's __init__?

Well, the downside of this is even more code and double instantiation. Nuts.

I guess I'll just go with first instinct.

No comments: