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: | 715 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 143:32:16 |
| Calls: | 12,089 |
| Calls today: | 2 |
| Files: | 15,000 |
| Messages: | 6,517,474 |