Re: [Python-Dev] BDFL delegation for PEP 426 (PyPI metadata 1.3)

2013-02-23 Thread Nick Coghlan
On Sat, Feb 23, 2013 at 5:29 AM, Chris Withers wrote: > ...but let's make sure we keep caring about the tools that people really > use, which includes both setuptools and distribute. The lack of a meaningful transition plan is where I think we fell down with PEP 345 & 386, and is also the main re

Re: [Python-Dev] [Python-checkins] peps: PEP 426: replace implied 'version starts with' with new ~= operator

2013-02-23 Thread Nick Coghlan
On Sat, Feb 23, 2013 at 2:24 PM, Ezio Melotti wrote: > Hi, > > On Sat, Feb 23, 2013 at 5:33 AM, daniel.holth > wrote: >> http://hg.python.org/peps/rev/de69fe61f300 >> changeset: 4764:de69fe61f300 >> user:Daniel Holth >> date:Fri Feb 22 22:33:09 2013 -0500 >> summary: >> PEP 4

Re: [Python-Dev] [Python-checkins] peps: PEP 426: replace implied 'version starts with' with new ~= operator

2013-02-23 Thread Vinay Sajip
Nick Coghlan gmail.com> writes: > Daniel is a fan of this syntax, but I think it is inferior to the > implied approach, so don't expect it to survive to any accepted > version of the PEP :) Another thing against ~= is that it isn't valid Python syntax. It's not a deal- breaker, but it does mean

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Stefan Krah
eli.bendersky wrote: > +Ordered comparisons between enumeration values are *not* supported. Enums > are > +not integers! Hmm. I think this limits interoperation with C libraries and prototyping C code. Actually all I want from a Python enum is to be like a C enum with symbolic representations

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Antoine Pitrou
On Sat, 23 Feb 2013 16:02:31 +0100 Stefan Krah wrote: > eli.bendersky wrote: > > +Ordered comparisons between enumeration values are *not* supported. Enums > > are > > +not integers! > > Hmm. I think this limits interoperation with C libraries and prototyping > C code. Agreed, this is a deal-

Re: [Python-Dev] [Python-checkins] peps: PEP 426: replace implied 'version starts with' with new ~= operator

2013-02-23 Thread Nick Coghlan
On Sun, Feb 24, 2013 at 12:57 AM, Vinay Sajip wrote: > Nick Coghlan gmail.com> writes: > >> Daniel is a fan of this syntax, but I think it is inferior to the >> implied approach, so don't expect it to survive to any accepted >> version of the PEP :) > > Another thing against ~= is that it isn't v

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Nick Coghlan
On Sun, Feb 24, 2013 at 1:06 AM, Antoine Pitrou wrote: > On Sat, 23 Feb 2013 16:02:31 +0100 > Stefan Krah wrote: >> eli.bendersky wrote: >> > +Ordered comparisons between enumeration values are *not* supported. >> > Enums are >> > +not integers! >> >> Hmm. I think this limits interoperation wi

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread R. David Murray
On Sun, 24 Feb 2013 01:31:09 +1000, Nick Coghlan wrote: > On Sun, Feb 24, 2013 at 1:06 AM, Antoine Pitrou wrote: > > On Sat, 23 Feb 2013 16:02:31 +0100 > > Stefan Krah wrote: > >> eli.bendersky wrote: > >> > +Ordered comparisons between enumeration values are *not* supported. > >> > Enums are

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Eli Bendersky
On Sat, Feb 23, 2013 at 7:57 AM, R. David Murray wrote: > On Sun, 24 Feb 2013 01:31:09 +1000, Nick Coghlan > wrote: > > On Sun, Feb 24, 2013 at 1:06 AM, Antoine Pitrou > wrote: > > > On Sat, 23 Feb 2013 16:02:31 +0100 > > > Stefan Krah wrote: > > >> eli.bendersky wrote: > > >> > +Ordered compa

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Barry Warsaw
On Feb 23, 2013, at 04:02 PM, Stefan Krah wrote: >Hmm. I think this limits interoperation with C libraries and prototyping >C code. As for flufl.enums, it doesn't really, because while items are not ints they are interoperable with ints. >>> from flufl.enum import make >>> Colors = make('Colors'

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Ethan Furman
eli.bendersky wrote: +Ordered comparisons between enumeration values are *not* supported. Enums are +not integers! class WeekDays(Enum): SUNDAY = enum(doc='last day of the weekend') MONDAY = enum(doc='back to work!') TUESDAY = enum(doc='ho hum day') WEDNESDAY =

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread R. David Murray
On Sat, 23 Feb 2013 08:27:50 -0800, Eli Bendersky wrote: > On Sat, Feb 23, 2013 at 7:57 AM, R. David Murray wrote: > > > On Sun, 24 Feb 2013 01:31:09 +1000, Nick Coghlan > > wrote: > > > On Sun, Feb 24, 2013 at 1:06 AM, Antoine Pitrou > > wrote: > > > > On Sat, 23 Feb 2013 16:02:31 +0100 > > >

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Nick Coghlan
On Sun, Feb 24, 2013 at 2:27 AM, Eli Bendersky wrote: > Any suggestions for places in the stdlib where enums could come useful will > be most welcome For named values in general: - 0, 1, 2 as file descriptors (stdin/stdout/stderr) - 0, 1, 2 as relative seek locations (start, current, end, but I

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Antoine Pitrou
On Sat, 23 Feb 2013 08:27:50 -0800 Eli Bendersky wrote: > > See also http://bugs.python.org/issue16801#msg178542 for another use > > case for named values. > > > > I've seen an awful lot of code that uses global variables or class > > attributes primarily to get name validation on constant values,

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Eli Bendersky
On Sat, Feb 23, 2013 at 9:04 AM, Antoine Pitrou wrote: > On Sat, 23 Feb 2013 08:27:50 -0800 > Eli Bendersky wrote: > > > See also http://bugs.python.org/issue16801#msg178542 for another use > > > case for named values. > > > > > > I've seen an awful lot of code that uses global variables or clas

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Ethan Furman
On 02/23/2013 08:27 AM, Eli Bendersky wrote: Any suggestions for places in the stdlib where enums could come useful will be most welcome codecs.EncodedFile: errors = 'strict' | 'ignore' | 'xmlcharrefreplace' | 'replace' socket: AF_INET, AF_UNIX -- socket domains (first argument to soc

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Nick Coghlan
On Sun, Feb 24, 2013 at 3:15 AM, Eli Bendersky wrote: > Hmm, constants such as os.SEEK_* which serve as *inputs* to stdlib rather > than outputs can actually be a good candidate for enum without worrying > about backwards compatibility. Not true - users may be taking those values and passing the

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread R. David Murray
On Sat, 23 Feb 2013 09:15:54 -0800, Eli Bendersky wrote: > On Sat, Feb 23, 2013 at 9:04 AM, Antoine Pitrou wrote: > > > On Sat, 23 Feb 2013 08:27:50 -0800 > > Eli Bendersky wrote: > > > > See also http://bugs.python.org/issue16801#msg178542 for another use > > > > case for named values. > > > >

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Ethan Furman
On 02/23/2013 09:46 AM, Nick Coghlan wrote: Many other existing libraries would be in the same boat - backwards compatibility would be an insurmountable barrier to using enums, but they *could* use named values. I like the idea of named values, but to be clear about enums: if they are int-bas

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Ethan Furman
On 02/23/2013 09:15 AM, Eli Bendersky wrote: Hmm, constants such as os.SEEK_* which serve as *inputs* to stdlib rather than outputs can actually be a good candidate for enum without worrying about backwards compatibility. The reason I make the *input* vs. *output* distinction, is that for std

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Eric Snow
On Sat, Feb 23, 2013 at 10:46 AM, Nick Coghlan wrote: > However, pitching this at the enum level also introduces a mandatory > level of structure we may not care about. All of the arguments about > enums and what they should and shouldn't allow happen at the higher > level, to do with the relation

[Python-Dev] request._parse

2013-02-23 Thread Demian Brecht
Hope this question belongs here and not in python-ideas, but I'm curious about _parse in the Request object. Specifically, why it was decided to write a custom parse function when the likes or urlparse or urlsplit do essentially the same thing. Doesn't really seem DRY to me.. I was going to change

Re: [Python-Dev] request._parse

2013-02-23 Thread Terry Reedy
On 2/23/2013 2:36 PM, Demian Brecht wrote: Hope this question belongs here and not in python-ideas, but I'm curious about _parse in the Request object. Specifically, why it was decided to write a custom parse function when the likes or urlparse or urlsplit do essentially the same thing. urllib.

[Python-Dev] Fwd: request._parse

2013-02-23 Thread Demian Brecht
Sounds good to me, thanks for the feedback.. Yes, I guess tackling known issues is a much better use of time than trying to dig my own up ;) > If you want to be helpful, leave _parse along and find a real bug to work on > ;-). There are several urllib bug issues. Or check out the code coverage of

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Terry Reedy
On 2/23/2013 12:46 PM, Nick Coghlan wrote: For the standard library, we *really don't care* about any of those things, because we're currently using integers and strings for everything, so we can't add structure without risking breaking other people's code. However, just as we can get away with

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Mark Janssen
On Sat, Feb 23, 2013 at 7:02 AM, Stefan Krah wrote: > eli.bendersky wrote: >> +Ordered comparisons between enumeration values are *not* supported. Enums >> are >> +not integers! I agree with your idea, but note you probably shouldn't call them e-num-erations, then. > Hmm. I think this limits

[Python-Dev] Python 2.7.4 and 3.2.4

2013-02-23 Thread Perica Zivkovic
Hi there, like posted here: https://groups.google.com/forum/?fromgroups=#!topic/comp.lang.python/xXij443PM6I I'm curious to find out are there any timelines when 2.7.4 and 3.2.4 will be available. I was kinda waiting for it to release new Portable Python so now I'm just curious should I wait bit

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Nick Coghlan
On 24 Feb 2013 08:14, "Terry Reedy" wrote: > > On 2/23/2013 12:46 PM, Nick Coghlan wrote: > >> For the standard library, we *really don't care* about any of those >> things, because we're currently using integers and strings for >> everything, so we can't add structure without risking breaking oth

Re: [Python-Dev] [Python-checkins] peps: Pre-alpha draft for PEP 435 (enum). The name is not important at the moment, as

2013-02-23 Thread Nick Coghlan
On Sun, Feb 24, 2013 at 12:19 PM, Nick Coghlan wrote: > On 24 Feb 2013 08:14, "Terry Reedy" wrote: >> I personally think we should skip the bikeshedding over how to avoid >> repeating names to make the bound name match the definition name (as with >> def, class, and import). Actually, they do not