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 ch...@simplistix.co.uk 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

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 ezio.melo...@gmail.com wrote: Hi, On Sat, Feb 23, 2013 at 5:33 AM, daniel.holth python-check...@python.org wrote: http://hg.python.org/peps/rev/de69fe61f300 changeset: 4764:de69fe61f300 user:Daniel Holth dho...@fastmail.fm date:

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

2013-02-23 Thread Vinay Sajip
Nick Coghlan ncoghlan at 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

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 python-check...@python.org 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

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 ste...@bytereef.org wrote: eli.bendersky python-check...@python.org wrote: +Ordered comparisons between enumeration values are *not* supported. Enums are +not integers! Hmm. I think this limits interoperation with C libraries and

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 vinay_sa...@yahoo.co.uk wrote: Nick Coghlan ncoghlan at 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

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 solip...@pitrou.net wrote: On Sat, 23 Feb 2013 16:02:31 +0100 Stefan Krah ste...@bytereef.org wrote: eli.bendersky python-check...@python.org wrote: +Ordered comparisons between enumeration values are *not* supported. Enums are +not

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 ncogh...@gmail.com wrote: On Sun, Feb 24, 2013 at 1:06 AM, Antoine Pitrou solip...@pitrou.net wrote: On Sat, 23 Feb 2013 16:02:31 +0100 Stefan Krah ste...@bytereef.org wrote: eli.bendersky python-check...@python.org wrote: +Ordered

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 rdmur...@bitdance.comwrote: On Sun, 24 Feb 2013 01:31:09 +1000, Nick Coghlan ncogh...@gmail.com wrote: On Sun, Feb 24, 2013 at 1:06 AM, Antoine Pitrou solip...@pitrou.net wrote: On Sat, 23 Feb 2013 16:02:31 +0100 Stefan Krah

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', 'red

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 eli...@gmail.com wrote: On Sat, Feb 23, 2013 at 7:57 AM, R. David Murray rdmur...@bitdance.comwrote: On Sun, 24 Feb 2013 01:31:09 +1000, Nick Coghlan ncogh...@gmail.com wrote: On Sun, Feb 24, 2013 at 1:06 AM, Antoine Pitrou

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 eli...@gmail.com 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

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

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 eli...@gmail.com 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

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 eli...@gmail.com wrote: On Sat, Feb 23, 2013 at 9:04 AM, Antoine Pitrou solip...@pitrou.net wrote: On Sat, 23 Feb 2013 08:27:50 -0800 Eli Bendersky eli...@gmail.com wrote: See also http://bugs.python.org/issue16801#msg178542 for another

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

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 ncogh...@gmail.com 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

[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 ste...@bytereef.org wrote: eli.bendersky python-check...@python.org 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

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 tjre...@udel.edu 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

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 ncogh...@gmail.com wrote: On 24 Feb 2013 08:14, Terry Reedy tjre...@udel.edu 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