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: | 741 |
| Nodes: | 16 (2 / 14) |
| Uptime: | 82:52:29 |
| Calls: | 12,451 |
| Calls today: | 1 |
| Files: | 15,194 |
| Messages: | 6,537,778 |