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: | 546 |
Nodes: | 16 (2 / 14) |
Uptime: | 04:15:12 |
Calls: | 10,387 |
Calls today: | 2 |
Files: | 14,061 |
Messages: | 6,416,779 |