Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-09 Thread Barry Warsaw
On Fri, 2005-12-09 at 16:23 -0800, 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 "Err

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-09 Thread Steven Bethard
Barry Warsaw wrote: > On Fri, 2005-12-09 at 15:38 -0600, Ian Bicking wrote: > >Also decide whether your attributes should be private or not. > >The difference between private and non-public is that the former > >will never be useful for a derived class, while the latter migh

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-09 Thread Robert Brewer
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

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-09 Thread Barry Warsaw
On Fri, 2005-12-09 at 17:19 -0600, Ian Bicking wrote: > I personally feel "cls" should be used for classmethods, and not > elsewhere. Just like I wouldn't like someone using "self" outside of > the first argument of instance methods. So class_ still would be a good > spelling elsewhere. Cool

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-09 Thread Ian Bicking
Ian Bicking wrote: >(Let's hope that these variables are meant for use inside one >module only.) The conventions are about the same as those for >functions. Modules that are designed for use via "from M import *" >should prefix their globals (and internal functions

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-09 Thread Ian Bicking
Barry Warsaw wrote: > It does seem like the more popular convention is to use "cls" than > "class_". I'll admit the latter does look kind of ugly. Maybe the > suggestion should be to use either a trailing single underscore or an > abbreviation instead of a spelling corruption. We could then list

Re: [Python-Dev] PEP 8 updates/clarifications

2005-12-09 Thread Barry Warsaw
On Fri, 2005-12-09 at 15:38 -0600, Ian Bicking wrote: > I was reading through PEP 8, and I think there's a few things that could > be clarified or updated: BTW, I'm willing to make updates to PEP 8, if we agree on what to change. > Exception Names > >If a module defines a single ex

[Python-Dev] PEP 8 updates/clarifications

2005-12-09 Thread Ian Bicking
I was reading through PEP 8, and I think there's a few things that could be clarified or updated: Exception Names If a module defines a single exception raised for all sorts of conditions, it is generally called "error" or "Error". It seems that built-in (extension) mo

Re: [Python-Dev] imaplib module with IDLE implememted via threads

2005-12-09 Thread Guido van Rossum
I hope you'll check this into SVN too? --Guido On 12/8/05, Piers Lauder <[EMAIL PROTECTED]> wrote: > If anyone needs the IMAP4 extension "IDLE", there is a copy of an enhanced > imaplib module available for download here: > > http://www.cs.usyd.edu.au/~piers/python/imaplib.html > > This is an I

Re: [Python-Dev] ast-objects branch created

2005-12-09 Thread Delaney, Timothy (Tim)
Fredrik Lundh wrote: > if you check my original post, you'll find code for a new list helper > function, which would solve this in a convenient way. Yep - I thought I'd seen something like this, but couldn't find it (eventually found it by searching for Lundh ;). That's exactly what I was thinkin