Hi, people. I just noticed this: >>> class booleen(bool): ... def __repr__(self): ... if self: ... return "Vrai" ... return "Faux" ... Traceback (most recent call last): File "<stdin>", line 1, in ? TypeError: type 'bool' is not an acceptable base type >>> and am a bit surprised that `bool' refuses to be sub-classed. Not that I cannot live without it, of course! But it might be useful being able to "cast" a `bool' into something for which I could control the representation, while keeping all other properties of `bool'. Is there a deep reason behind the forbidding? Or was it merely for possibly protecting users against themselves? :-) For me, this is a question, much more than an issue. Yet, if there is no deep reason, maybe the forbidding could be lifted? -- François Pinard http://www.iro.umontreal.ca/~pinard
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4