From: Martin v. Loewis <martin@v.loewis.de> > Guido van Rossum <guido@python.org> writes: > > > > > What does "that" (in "If that is the rule") refer back to? > > "user-defined exceptions be derived from Exception". It is only a > recommendation in the sense that you can use arbitrary classic > classes. If the rule is eventually tightened, it is ok if new-style > classes are not allowed as exceptions right now. An action is only > needed if you pronounce that it is desirable to allow new-style > classes as exceptions - which would necessarily have a base class that > is not derived from Exception. > But this is legal in 2.2 >>> class Z(str,Exception): ... pass ... >>> Z.__bases__ (<type 'str'>, <class exceptions.Exception at 0x00757700>) >>> Z.__base__ <type 'str'> so the issue is more subtle or I'm missing something? regards.
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