Re: [Python-Dev] PEP 8 updates/clarifications
Robert Brewer wrote: > Barry Warsaw wrote: > >>Again, I'd say something like: Since your exceptions >>will be classes, use the CapWord naming convention for >>classes to name your exceptions. It is recommended >>that your exception class end in the word "Error". > > > Unless, of course, your exception is not an error (like the > aforementioned HTTPRedirect). ;) > For library modules I'd recommend that the exception hierarchy be rooted at either BaseError (for modules not designed from import-*) or ModulenameBaseError (for those that are). regards Steve -- Steve Holden +44 150 684 7255 +1 800 494 3119 Holden Web LLC www.holdenweb.com PyCon TX 2006 www.python.org/pycon/ ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] PEP 8 updates/clarifications
Barry Warsaw <[EMAIL PROTECTED]> writes: > Let's say something like "string-based exceptions are strongly > discouraged, and in fact may be deprecated or disappear in a future > Python version. Use class-based exceptions." If I have anything to do with it, they _will_ be deprecated in 2.5. There is simply no excuse for writing new code using string exceptions. Cheers, mwh (PS: are people still interested in my new-style exceptions patch? http://bugs.python.org/1104669) -- In the 1950s and 60s there was a regular brain drain of young Australians from the cities to London, but it was because of money, culture and opportunity, not spiders. -- Al Grant, ucam.chat, from Owen Dunn's review of the year ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
[Python-Dev] New-style exceptions patch (was Re: PEP 8 updates/clarifications)
Michael Hudson wrote: > Barry Warsaw <[EMAIL PROTECTED]> writes: > >> Let's say something like "string-based exceptions are strongly >> discouraged, and in fact may be deprecated or disappear in a future >> Python version. Use class-based exceptions." > > If I have anything to do with it, they _will_ be deprecated in 2.5. > There is simply no excuse for writing new code using string > exceptions. > > Cheers, > mwh > (PS: are people still interested in my new-style exceptions patch? > http://bugs.python.org/1104669) Is there a specific concern with it you want people to check out, or just a few more "works for me" tests on different platforms? Cheers. Nick. -- Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia --- http://www.boredomandlaziness.org ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] New-style exceptions patch
Nick Coghlan <[EMAIL PROTECTED]> writes: > Michael Hudson wrote: >> (PS: are people still interested in my new-style exceptions patch? >> http://bugs.python.org/1104669) > > Is there a specific concern with it you want people to check out, or just a > few more "works for me" tests on different platforms? Well, I'd like some more people to vet it for basic sanity and maybe have a thought about documentation changes. Beyond checking that it compiles with various C compilers I hope that there's not that much chance for x-platform variation here. Cheers, mwh -- > Why are we talking about bricks and concrete in a lisp newsgroup? After long experiment it was found preferable to talking about why Lisp is slower than C++... -- Duane Rettig & Tim Bradshaw, comp.lang.lisp ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] PEP 8 updates/clarifications
[Ian Bicking] >Barry Warsaw wrote: >Just like I wouldn't like someone using "self" outside of the first >argument of instance methods. A tiny nit. Within __new__(cls, ...), I find quite legible writing: self = BASECLASSE.__new__(cls, ...) and using it afterwards. -- François Pinard http://pinard.progiciels-bpi.ca ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
Re: [Python-Dev] PEP 8 updates/clarifications
On 12/10/05, Michael Hudson <[EMAIL PROTECTED]> wrote: > Barry Warsaw <[EMAIL PROTECTED]> writes: > > > Let's say something like "string-based exceptions are strongly > > discouraged, and in fact may be deprecated or disappear in a future > > Python version. Use class-based exceptions." > > If I have anything to do with it, they _will_ be deprecated in 2.5. > There is simply no excuse for writing new code using string > exceptions. > PEP 352 will deprecate raising string exceptions in 2.5 . > Cheers, > mwh > (PS: are people still interested in my new-style exceptions patch? > http://bugs.python.org/1104669) I am. I was planning to use the patch as a base for implementing PEP 352. Guido is pretty much ready to accept the PEP, he just has not officially pronounced yet. -Brett ___ Python-Dev mailing list [email protected] http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com
