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: | 765 |
| Nodes: | 16 (1 / 15) |
| Uptime: | 03:44:49 |
| Calls: | 12,761 |
| Calls today: | 5 |
| Files: | 15,362 |
| Messages: | 6,557,021 |