As per my recent foray into abusing existence-checking for Singleton assurance
along such lines as
try: self.initialized
except AttributeError: print('first instantiation'); self.initialized = True
and then changing that to
try: self.initialized:bool
But that's not equivalent code.
| Sysop: | Keyop |
|---|---|
| Location: | Huddersfield, West Yorkshire, UK |
| Users: | 796 |
| Nodes: | 16 (0 / 16) |
| Uptime: | 164:58:47 |
| Calls: | 13,194 |
| Calls today: | 1 |
| Files: | 15,487 |
| Messages: | 6,579,158 |