Re: [Python-Dev] PEP 362 Second Revision

2012-06-07 Thread Terry Reedy
On 6/7/2012 4:54 PM, Yury Selivanov wrote: I think we'll add a 'format' method to the Signature, that will work like 'inspect.formatargspec'. 'Signature.__str__' will use it with default parameters/formatters. Great. If I don't like the default, I could customize. I'm not sure how __repr__

Re: [Python-Dev] backporting stdlib 2.7.x from pypy to cpython

2012-06-11 Thread Terry Reedy
On 6/11/2012 11:13 PM, fwierzbi...@gmail.com wrote: On Sun, Jun 10, 2012 at 11:58 PM, Nick Coghlan wrote: 2. As 1, but we adopt a subject line convention to make it easier to filter out general python-dev traffic for those that are just interested in cross-vm questions (2) and (3) work for

Re: [Python-Dev] segfault - potential double free when using iterparse

2012-06-12 Thread Terry Reedy
On 6/12/2012 9:40 AM, Alon Horev wrote: Hi All, First of all, I'm not opening a bug yet as I'm not certain whether this is a CPython bug or lxml bug. lxml is more likely, making this a topic for python-list and whatever lxml list. ... from lxml.etree import iterparse ... anyone familiar

[Python-Dev] #12982: Should -O be required to *read* .pyo files?

2012-06-12 Thread Terry Reedy
http://bugs.python.org/issue12982 Currently, cpython requires the -O flag to *read* .pyo files as well as the write them. This is a nuisance to people who receive them from others, without the source. The originator of the issue quotes the following from the doc (without giving the location).

Re: [Python-Dev] #12982: Should -O be required to *read* .pyo files?

2012-06-13 Thread Terry Reedy
On 6/13/2012 2:46 PM, Antoine Pitrou wrote: Not only docstrings, but also asserts. I think running a pyo without -O would be a bug. That cat is already out of the bag ;-) People are doing that now by renaming x.pyo to x.pyc. Brett claims that it is also easy to do in 3.3 with a custom importer

Re: [Python-Dev] #12982: Should -O be required to *read* .pyo files?

2012-06-13 Thread Terry Reedy
On 6/13/2012 1:19 PM, Brett Cannon wrote: On Tue, Jun 12, 2012 at 2:16 PM, Terry Reedy mailto:tjre...@udel.edu>> wrote: http://bugs.python.org/__issue12982 <http://bugs.python.org/issue12982> Currently, cpython requires the -O flag to *read* .pyo files as well as th

Re: [Python-Dev] #12982: Should -O be required to *read* .pyo files?

2012-06-13 Thread Terry Reedy
On 6/13/2012 8:55 PM, Steven D'Aprano wrote: On Wed, Jun 13, 2012 at 01:58:10PM -0400, R. David Murray wrote: So, is there any reason to not use the .pyo file (if that's all that is around) when -O is not specified? .pyo and .pyc files have potentially different semantics. Right now, .pyo fil

Re: [Python-Dev] Tunable parameters in dictobject.c (was dictnotes.txt out of date?)

2012-06-13 Thread Terry Reedy
On 6/13/2012 9:15 PM, Raymond Hettinger wrote: On Jun 13, 2012, at 2:37 PM, Mark Shannon wrote: I think that for combined tables a growth factor of x2 is best, but I don't have any hard evidence to back that up. I believe that change should be reverted. You've undone work that was based on e

Re: [Python-Dev] #12982: Should -O be required to *read* .pyo files?

2012-06-13 Thread Terry Reedy
On 6/13/2012 10:47 PM, R. David Murray wrote: On Thu, 14 Jun 2012 11:48:08 +1000, Nick Coghlan wrote: Right, but by resorting to either of those approaches, people are clearly doing something that isn't formally supported by the core. That was not clear to me until I read your post -- the k

Re: [Python-Dev] PEP 362 Third Revision

2012-06-14 Thread Terry Reedy
On 6/14/2012 6:00 AM, Nick Coghlan wrote: > Just a thought: Do we want to include the docstring? A function's > docstring is often intimately tied to its signature. (Or at least, a > lot of us try to write docstrings that effectively describe the > function's signature) No, combining the si

Re: [Python-Dev] PEP 362 Third Revision

2012-06-14 Thread Terry Reedy
On 6/14/2012 1:10 PM, Brett Cannon wrote: On Thu, Jun 14, 2012 at 12:39 PM, Yury Selivanov mailto:yselivanov...@gmail.com>> wrote: On 2012-06-14, at 12:32 PM, Benjamin Peterson wrote: > 2012/6/14 Yury Selivanov mailto:yselivanov...@gmail.com>>: >> On 2012-06-14, at 11:24 AM, Bre

Re: [Python-Dev] PEP 362 Third Revision

2012-06-14 Thread Terry Reedy
On 6/14/2012 3:46 PM, Ethan Furman wrote: Antoine Pitrou wrote: Also, the "is_*" attributes are misleading: it looks like they are orthogonal but only one of them can be true at any time. This is no different from what we have with strings now: --> 'aA'.islower() False --> 'aA'.isupper() Fa

Re: [Python-Dev] PEP 362: 4th edition

2012-06-16 Thread Terry Reedy
On 6/16/2012 6:40 PM, Yury Selivanov wrote: Actually, Signature and Parameter are currently non-hashable (they are mutable). I'm not sure if it was a right decision. If this is added for 3.3, I think it would be a candidate for 'provisional' (ie, api subject to change) status. (That is not t

Re: [Python-Dev] Raw string syntax inconsistency

2012-06-17 Thread Terry Reedy
On 6/17/2012 10:59 AM, "Martin v. Löwis" wrote: So, while PEP 414 will allow u"" to run unmodified, ur"" will still need to be changed to something else, because that partially escaped behaviour isn't available in 3.x and we don't want to reintroduce it. Given that the PEP currently explicitly

Re: [Python-Dev] Raw string syntax inconsistency

2012-06-17 Thread Terry Reedy
On 6/17/2012 9:07 PM, Guido van Rossum wrote: On Sun, Jun 17, 2012 at 4:55 PM, Nick Coghlan So, perhaps the answer is to leave this as is, and try to make 2to3 smart enough to detect such escapes and replace them with their properly encoded (according to the source code encoding) U

Re: [Python-Dev] What's the best way to debug python3 source code?

2012-06-17 Thread Terry Reedy
On 6/18/2012 12:43 AM, gmspro wrote: What's the best way to debug python3 source code? ... The pydev list is for development *of* future python releases. For questions about development *with* current releases, please ask on python-list or other user oriented forums. -- Terry Jan Reedy

Re: [Python-Dev] Raw string syntax inconsistency

2012-06-17 Thread Terry Reedy
On 6/18/2012 2:06 AM, "Martin v. Löwis" wrote: Hm. I still encounter enough environments that don't know how to display such characters that I would prefer to have a rock solid \u escape mechanism. If you want to use them under the revised PEP 414, you will have to avoid making them raw, and j

Re: [Python-Dev] What's the best way to debug python3 source code? (for this bug: http://bugs.python.org/issue15068)

2012-06-18 Thread Terry Reedy
On 6/18/2012 7:10 AM, gmspro wrote: I'm working on this bug, http://bugs.python.org/issue15068 Oh. From your first message, I thought you were asking about a personal bug. I will mention that real names are customary on this list. (Unless you have a good professional reason otherwise.) They

Re: [Python-Dev] CFFI released

2012-06-18 Thread Terry Reedy
On 6/18/2012 9:14 AM, Armin Rigo wrote: Hi all, We (=fijal and myself) finally released the beta-0.1 version of CFFI. http://cffi.readthedocs.org/ It is a(nother) simple Foreign Function Interface for Python calling C code. I talked about it with a few python core people during the PyCon spri

Re: [Python-Dev] Raw string syntax inconsistency

2012-06-18 Thread Terry Reedy
On 6/18/2012 11:12 AM, Guido van Rossum wrote: Ok, banning ru"..." and ur"..." altogether is fine too (assuming it's fine with the originators of the PEP). The original PEP never proposed ur or ru , only u/U. It turns out that ur is problematical even in 2.x, as its meaning is changed by the

Re: [Python-Dev] 3.3 beta in one week

2012-06-18 Thread Terry Reedy
On 6/18/2012 11:23 AM, Brian Curtin wrote: On Mon, Jun 18, 2012 at 2:17 AM, "Martin v. Löwis" wrote: this is just a quick reminder that the feature freeze for 3.3 will start next weekend with the release of beta1. Since I won't be able to shift that date for short periods (the next possible d

Re: [Python-Dev] CFFI released

2012-06-18 Thread Terry Reedy
On 6/18/2012 5:29 PM, Armin Rigo wrote: On Mon, Jun 18, 2012 at 9:10 PM, Maciej Fijalkowski wrote: >> Me Make cffi less buggy (check the tracker for new test cases ;-), faster (closer to swig type wrappers), and easier to use than ctypes, and I am sure there will be interest. I would say it'

Re: [Python-Dev] [Python-checkins] cpython: Issue #14769: test_capi now has SkipitemTest, which cleverly checks

2012-06-22 Thread Terry Reedy
On 6/22/2012 6:57 AM, larry.hastings wrote: http://hg.python.org/cpython/rev/ace45d23628a changeset: 77567:ace45d23628a user:Larry Hastings date:Fri Jun 22 03:56:29 2012 -0700 summary: Issue #14769: test_capi now has SkipitemTest, which cleverly checks for "parity" between P

Re: [Python-Dev] Feature Freeze

2012-06-22 Thread Terry Reedy
On 6/22/2012 3:00 PM, Ethan Furman wrote: can somebody review (and commit! :) issues: http://bugs.python.org/issue14954 About weakref, no response yet. Beyond my knowledge. http://bugs.python.org/issue14617 About __hash__, a short response from Éric Araujo I might look at this. -- Terry

[Python-Dev] ssh://h...@hg.python.org/cpython unstable?

2012-06-22 Thread Terry Reedy
90% of the way through recloning cpython on Win7, I got Putty Error: Network error: software called connection abort Tortoise hg said abort: stream ended unexpectedly (got 53602 bytes, expected 55236) Two retries give same Putty error almost immdiately, with hg message no suitable response from r

Re: [Python-Dev] A Desperate Plea For Introspection (aka: BDFAP Needed)

2012-06-22 Thread Terry Reedy
On 6/22/2012 3:24 PM, Yury Selivanov wrote: On 2012-06-22, at 3:18 PM, Guido van Rossum wrote: Hardly, because that's not valid syntax. I'd write name(arg1, *, arg2=). Like replace(*, name=, kind=, default=, annotation=) -> Parameter or replace

Re: [Python-Dev] [Python-checkins] cpython: Issue #14769: test_capi now has SkipitemTest, which cleverly checks

2012-06-22 Thread Terry Reedy
On 6/22/2012 2:21 PM, MRAB wrote: On 22/06/2012 17:39, Terry Reedy wrote: On 6/22/2012 6:57 AM, larry.hastings wrote: http://hg.python.org/cpython/rev/ace45d23628a changeset: 77567:ace45d23628a user:Larry Hastings date:Fri Jun 22 03:56:29 2012 -0700 summary: Issue #14769

Re: [Python-Dev] Status of packaging in 3.3

2012-06-22 Thread Terry Reedy
On 6/22/2012 6:09 AM, Vinay Sajip wrote: Easy enough on Posix platforms, perhaps, but what about Windows? Every time windows users download and install a binary, they are taking a chance. I try to use a bit more sense than some people, but I know it is not risk free. There *is* a third party

Re: [Python-Dev] ssh://h...@hg.python.org/cpython unstable?

2012-06-22 Thread Terry Reedy
Since worked ok. -- Terry Jan Reedy ___ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Re: [Python-Dev] cpython (3.2): Issue12510: Attempting to get invalid tooltip no longer closes Idle.

2012-05-28 Thread Terry Reedy
On 5/28/2012 9:48 PM, Brian Curtin wrote: > On Mon, May 28, 2012 at 8:44 PM, Terry Reedy wrote: snipped context: return eval(user_entered_expression, namespace) >>>> +except: >>>> return None >>> >>> >>>

Re: [Python-Dev] Poking about issue 1677

2012-06-26 Thread Terry Reedy
On 6/26/2012 6:51 AM, Devin Jeanpierre wrote: The issue is that sometimes, if you press ctrl-c on Windows, instead of raising a KeyboardInterrupt, Python will exit completely. Because of this, any program that relies on ctrl-c/KeyboardInterrupt is not guaranteed to work on windows. Also, working

Re: [Python-Dev] [Python-checkins] cpython: Changed importlib tests to use assertIs, assertIsInstance, etc., instead of

2012-06-27 Thread Terry Reedy
On 6/27/2012 3:26 PM, eric.smith wrote: http://hg.python.org/cpython/rev/9623c83ba489 changeset: 77825:9623c83ba489 user:Eric V. Smith date:Wed Jun 27 15:26:26 2012 -0400 summary: Changed importlib tests to use assertIs, assertIsInstance, etc., instead of just assertTrue.

Re: [Python-Dev] [Infrastructure] Buildbot master moved

2012-06-28 Thread Terry Reedy
On 6/28/2012 10:04 AM, Hynek Schlawack wrote: Hi, I don’t know if it’s known, but the bot infrastructure is FUBAR now. http://buildbot.python.org/all/waterfall is a stacktrace and all tests fail because of the XML-RPC tests that use our buildbot API. Errors seem intermittant. Above just worked

Re: [Python-Dev] New stable buildbots

2012-07-02 Thread Terry Reedy
On 7/2/2012 2:51 PM, Antoine Pitrou wrote: Hello, I have decided to add two new buildslaves to the stable buildbots fleet: - Łukasz Langa's AMD64 OS Lion buildbot (using clang as compiler) - Jeremy Kloth's AMD64 Windows7 buildbot (our first 64-bit Windows buildbot!) Great. They bring the

Re: [Python-Dev] [Python-ideas] itertools.chunks(iterable, size, fill=None)

2012-07-04 Thread Terry Reedy
On 7/4/2012 5:57 AM, anatoly techtonik wrote: On Fri, Jun 29, 2012 at 11:32 PM, Georg Brandl wrote: Anatoly, so far there were no negative votes -- would you care to go another step and propose a patch? Was about to say "no problem", Did you read that there *are* strong negative votes? An

Re: [Python-Dev] PEP 0424: A method for exposing a length hint

2012-07-14 Thread Terry Reedy
On 7/14/2012 6:11 PM, Alex Gaynor wrote: ... Various thoughts: "This method is then used by various other functions (such +as ``map``) to presize lists" -- map no longer produces lists. This only makes sense in 3.x if you mean that map can pass along the value of its inputs. "Types can then

Re: [Python-Dev] 2to3 porting HOWTO: setup.py question

2012-07-24 Thread Terry Reedy
On 7/24/2012 12:44 AM, anatoly techtonik wrote: Python 3 check explicitly tells the reader that 2to3 should only be used in Python 3. Otherwise everybody need to guess when this *_2to3 tools are triggered. As for me, I see no technical limitations why *_2to3 can not be run by Python 2 (PyPy, RPy

Re: [Python-Dev] 2.7 releases

2012-07-26 Thread Terry Reedy
On 7/26/2012 2:50 PM, Thomas Heller wrote: Am 26.07.2012 20:16, schrieb mar...@v.loewis.de: Don't you have commit rights still? I dont't know. The tracker thinks you do. That is what the Python logo next to your name means. Anyway, I do know nearly nothing about hg and don't have time

Re: [Python-Dev] python-checkins moderation

2012-07-29 Thread Terry Reedy
On 7/29/2012 4:42 PM, Barry Warsaw wrote: I just freed up a bunch, but not all, of the messages to python-checkins being held for moderator approval. We could use some additional moderator volunteers. I'm not sure Fred is still moderating the list, and I suck at it. It seems that me that mess

Re: [Python-Dev] AST optimizer implemented in Python

2012-08-13 Thread Terry Reedy
On 8/13/2012 10:45 AM, Guido van Rossum wrote: Not so fast. If you make this a language feature you force all Python implementations to support an identical AST API. That's a big step. I have been wondering about this. One could think from the manuals that we are there already. From the beginn

Re: [Python-Dev] [compatibility-sig] do all VMs implement the ast module? (was: Re: AST optimizer implemented in Python)

2012-08-13 Thread Terry Reedy
On 8/13/2012 4:46 PM, Guido van Rossum wrote: On Mon, Aug 13, 2012 at 1:05 PM,fwierzbi...@gmail.com wrote: >On Mon, Aug 13, 2012 at 12:06 PM, Brett Cannon wrote: >>>I see nothing about ast possibly being CPython only. Should there be? >> >> >>Time to ask the other VMs what they are currentl

[Python-Dev] 3.3 str timings

2012-08-18 Thread Terry Reedy
The issue came up in python-list about string operations being slower in 3.3. (The categorical claim is false as some things are actually faster.) Some things I understand, this one I do not. Win7-64, 3.3.0b2 versus 3.2.3 print(timeit("c in a", "c = '…'; a = 'a'*1000+c")) # ord(c) = 8230 # .6

Re: [Python-Dev] 3.3 str timings

2012-08-18 Thread Terry Reedy
On 8/18/2012 5:27 PM, Antoine Pitrou wrote: On Sat, 18 Aug 2012 17:17:14 -0400 Terry Reedy wrote: The issue came up in python-list about string operations being slower in 3.3. (The categorical claim is false as some things are actually faster.) Some things I understand, this one I do not

Re: [Python-Dev] 3.3 str timings

2012-08-21 Thread Terry Reedy
On 8/21/2012 9:04 AM, Victor Stinner wrote: 2012/8/18 Terry Reedy : The issue came up in python-list about string operations being slower in 3.3. (The categorical claim is false as some things are actually faster.) Yes, some operations are slower, but others are faster :-) Yes, that is what

[Python-Dev] root@python doc cron job failure messages

2012-08-22 Thread Terry Reedy
root@python is indirectly trying to send doc cron job failure messages to the python-checkings list. headers below. They are caught and held for moderation since "Blind carbon copies or other implicit destinations are not allowed." I think it is a mistake to send these messages to checkins, whi

[Python-Dev] hg.python.org should default to defaut, not 2.7

2012-08-30 Thread Terry Reedy
If one goes to http://hg.python.org/cpython/ and clicks 'browse', it defaults to 2.7, not to default (now 3.3). Moreover, there is no indication that it is defaulting to an old branch rather than current default, as one might reasonably expect. I found this very confusing when I was trying to g

Re: [Python-Dev] Tru64 support

2012-09-04 Thread Terry Reedy
On 9/4/2012 5:24 AM, Andrew Svetlov wrote: Unittests for subprocess module has weird comment: We cannot use os.path.realpath to canonicalize the path, since it doesn't expand Tru64 {memb} strings. See bug 1063571. http://hg.python.org/cpython/file/82ae284cd5f1/Lib/test/test_subprocess.py#l374 is

Re: [Python-Dev] Tru64 support

2012-09-04 Thread Terry Reedy
On 9/4/2012 9:00 AM, Andrew Svetlov wrote: Aha, ./Doc/whatsnew/3.0.rst declares dropping support for Tru64. Several files in repo mention it, though. That suggests that it should be added to PEP11. Martin is the PEP editor, so I guess it is his final decision. -- Terry Jan Reedy __

[Python-Dev] Online docs: make index search available everywhere

2012-09-05 Thread Terry Reedy
For the Windows Help version of the docs, the left side box has 4 tabs: Contents, Index, Search, Favorites. I now mostly use the Index tab. That means that I can enter an indexed keyword, topic, or object name and jump from place to place in the docs. The left margin of the online docs only ha

Re: [Python-Dev] Online docs: make index search available everywhere

2012-09-06 Thread Terry Reedy
On 9/5/2012 8:53 PM, Nick Coghlan wrote: On Thu, Sep 6, 2012 at 8:13 AM, Terry Reedy wrote: I presume this suggestion does not belong on bugs.python.org, so I hope one of the docs people reading pydev will do something with it. Why do you assume that? My understanding is that the tracker

Re: [Python-Dev] Issue 15906; regression in argparse in Python 3.3, 3.2, and 2.7

2012-09-11 Thread Terry Reedy
On 9/11/2012 11:34 AM, Barry Warsaw wrote: Issue 15906 describes a problem with argparse that is breaking lots of code in Ubuntu. This is a recent regression caused by the fix for issue 12776, and it affects Python 2.7, 3.2, and 3.3. I posted a diff that should fix the problem, but at the heart

Re: [Python-Dev] Issue 15906; regression in argparse in Python 3.3, 3.2, and 2.7

2012-09-11 Thread Terry Reedy
On 9/11/2012 3:31 PM, Barry Warsaw wrote: On Sep 11, 2012, at 01:17 PM, Terry Reedy wrote: As I see it, storing is done *with* a default or explicit value, appending is done *to* a start value *with* whatever. Perhaps reusing 'default' instead of using a new name such as 'start

Re: [Python-Dev] [Python-checkins] cpython (merge 3.2 -> default): Fix out of bounds read in long_new() for empty bytes with an explicit base.

2012-09-12 Thread Terry Reedy
On 9/12/2012 10:22 AM, Stefan Krah wrote: christian.heimes wrote: Fix out of bounds read in long_new() for empty bytes with an explicit base. >> int(b'', somebase) calls PyLong_FromString() with char* of length 1 I don't know what happens internally, but such calls raise ValueError: invalid l

Re: [Python-Dev] Release of astoptimizer 0.3

2012-09-12 Thread Terry Reedy
On 9/12/2012 3:36 AM, Serhiy Storchaka wrote: I personally would prefer a 2to3-like "modernizer" (as a separate utility and as plugins for the IDEs), which would have found some templates and offered replacing by a more modern, readable (and possibly effective) variant. The decision on the appli

Re: [Python-Dev] TypeError: f() missing 1 required positional argument: 'x'

2012-09-20 Thread Terry Reedy
On 9/20/2012 7:56 AM, Mark Dickinson wrote: I suspect I've missed the boat on this one (certainly for 3.3.0), but here goes. The new TypeError reporting for bad function calls is a huge improvement (thanks Benjamin!), but I have one small nitpick: what *is* a positional argument? For example:

Re: [Python-Dev] TypeError: f() missing 1 required positional argument: 'x'

2012-09-20 Thread Terry Reedy
On 9/20/2012 10:12 AM, Benjamin Peterson wrote: 2012/9/20 Mark Dickinson : Thoughts? I tried to define the error messages in terms of the callee's signature. I call the formals that are not variadic, keyword variadic, or keyword-only, positional. For example, in def f(a, b, c, *args, d):

Re: [Python-Dev] TypeError: f() missing 1 required positional argument: 'x'

2012-09-20 Thread Terry Reedy
On 9/20/2012 11:52 AM, Guido van Rossum wrote: Maybe this is also a good time to start distinguishing between arguments (what you pass, call syntax) and parameters (what the function receives, function definition syntax)? One standard usage (and mine) is that parameters are the (local) names

Re: [Python-Dev] "Decimal(2) != float(2)"???

2012-09-29 Thread Terry Reedy
On 9/29/2012 11:48 PM, Steven D'Aprano wrote: On 30/09/12 10:43, Jan Kaliszewski wrote: Hello, In http://docs.python.org/release/3.2.3/reference/expressions.html#in we read: "[...] This can create the illusion of non-transitivity between supported cross-type comparisons and unsupported comparis

Re: [Python-Dev] [RELEASED] Python 3.3.0 release candidate 3

2012-09-29 Thread Terry Reedy
On 9/29/2012 2:38 PM, Guido van Rossum wrote: Does this mean we want to re-open the discussion about decimal constants? Last time this came up I think we decided that we wanted to wait for cdecimal (which is obviously here) and work out how to handle contexts, the syntax, etc. I think that oug

Re: [Python-Dev] Stdlib and timezones, again

2012-10-01 Thread Terry Reedy
On 10/1/2012 10:06 AM, Lennart Regebro wrote: Actually, that's not a bad idea. My original idea was to warn if it *was* outdated, but since there is no way to check that, I scratched that idea. Is there really no way to get a 'last updated' time from the site where the database is kept? If no

Re: [Python-Dev] Stdlib and timezones, again

2012-10-01 Thread Terry Reedy
On 10/1/2012 12:39 PM, Lennart Regebro wrote: On Mon, Oct 1, 2012 at 6:21 PM, Larry Hastings mailto:la...@hastings.org>> wrote: On 10/01/2012 04:29 PM, Barry Warsaw wrote: Using the script I mentioned in an different response, if someone installed the database to some location (TBD)

Re: [Python-Dev] Proposed schedule for Python 3.4

2012-10-04 Thread Terry Reedy
On 10/3/2012 12:02 PM, Larry Hastings wrote: What it really comes down to: I'm a first-time RM, and I lack the courage/wisdom to overrule what appears to be a reasonable status quo. I feel I don't have to defend the decision to maintain the status quo; I feel instead you have to make a case for

Re: [Python-Dev] Should vars() return modifiable dict?

2012-10-04 Thread Terry Reedy
On 10/3/2012 11:34 AM, Steven D'Aprano wrote: On 03/10/12 18:54, Serhiy Storchaka wrote: Should behavior of vars() be corrected for locals? I believe you are misinterpreting what you are seeing. In this case, vars() simply returns locals(), which is an ordinary dict, but changes to that dict

Re: [Python-Dev] Should vars() return modifiable dict?

2012-10-05 Thread Terry Reedy
On 10/5/2012 9:01 AM, Larry Hastings wrote: On 10/05/2012 01:59 PM, Devin Jeanpierre wrote: I've never understood why locals() returned a mutable dictionary either, except that Python has no immutable dictionary type. Ah, but these days it has types.MappingProxyType which provides a read-only

Re: [Python-Dev] return type of __complex__

2012-10-21 Thread Terry Reedy
On 10/21/2012 5:45 AM, Mark Dickinson wrote: On Sun, Oct 21, 2012 at 6:26 AM, Greg Ewing wrote: I think I've changed my mind on this, since it was pointed out that if you're going to return a float instead of a complex, you should really be implementing __float__, not __complex__. Yes, I'm wa

Re: [Python-Dev] return type of __complex__

2012-10-21 Thread Terry Reedy
On 10/21/2012 8:23 AM, Stephen J. Turnbull wrote: Greg Ewing writes: > Stephen J. Turnbull wrote: > > It's a design bug, yes. The question is, does it conform to > > documented behavior? > > The 2.7 docs say this about __complex__: > > Called to implement the built-in function

Re: [Python-Dev] Improve error message "UnboundLocalError: local variable referenced before assignment"

2012-10-31 Thread Terry Reedy
This post would have been more appropriate on python-list than python-dev. But to answer your implied questions... On 10/31/2012 3:57 PM, anatoly techtonik wrote: Here is the code: ---[cut]- DEBUG = [] FONT_NAMES = [] This line has nothing to do with the behavior

Re: [Python-Dev] Improve error message "UnboundLocalError: local variable referenced before assignment"

2012-10-31 Thread Terry Reedy
On 10/31/2012 4:28 PM, R. David Murray wrote: "local variable referenced before assignment" *is* a pointer to the concept of when global variables become local...perhaps there is a better wording, do you have a suggestion? The current wording is an exact, concise, description of the problem. R

Re: [Python-Dev] Improve error message "UnboundLocalError: local variable referenced before assignment"

2012-10-31 Thread Terry Reedy
On 10/31/2012 9:20 PM, Terry Reedy wrote: On 10/31/2012 4:28 PM, R. David Murray wrote: "local variable referenced before assignment" *is* a pointer to the concept of when global variables become local...perhaps there is a better wording, do you have a suggestion? The current wor

Re: [Python-Dev] Cut/Copy/Paste items in IDLE right click context menu

2012-11-02 Thread Terry Reedy
2.7 users. There are another opinion: it is new feature, not a bug, and the patch should be applied to 3.4 only. If you look on discussion for issue (http://bugs.python.org/issue1207589) you can see we cannot make decision, votes are split. I want to raise the question on this mailing list (as T

Re: [Python-Dev] Cut/Copy/Paste items in IDLE right click context menu

2012-11-02 Thread Terry Reedy
On 11/2/2012 10:04 PM, Nick Coghlan wrote: On Sat, Nov 3, 2012 at 3:29 AM, Terry Reedy wrote: The way to resolve a proposal like that is to put it forward as a PEP, and explain the rationale for treating IDLE differently. A PEP seems like overkill to me. The matter is a rule clarification

Re: [Python-Dev] chained assignment weirdity

2012-11-06 Thread Terry Reedy
On 11/6/2012 1:18 AM, Chris Withers wrote: Hi All, I bumped into this using Michael Foord's Mock library. It feels like a bug to me, but thought I'd ask here before logging one in the tracker in case people know that we won't be able to fix it: On 05/11/2012 13:43, Michael Foord wrote: class

Re: [Python-Dev] chained assignment weirdity

2012-11-07 Thread Terry Reedy
On 11/7/2012 9:54 AM, Guido van Rossum wrote: Hm. I really don't think that is a good development for Python to compromise in the area of expression evaluation order where side effects are involved. I agreee. I think Python's simple left to right evaluation order is one of its virtues. A g

Re: [Python-Dev] chained assignment weirdity

2012-11-07 Thread Terry Reedy
On 11/7/2012 10:17 AM, Guido van Rossum wrote: Ok, somebody go for it! (Also please refer to my pronouncement in the bug -- I've gotta run.) Done. http://bugs.python.org/issue11205?@ok_message=msg 175120 -- Terry Jan Reedy ___ Python-Dev mailing lis

Re: [Python-Dev] chained assignment weirdity

2012-11-07 Thread Terry Reedy
On 11/7/2012 4:39 PM, Ned Batchelder wrote: Just to be clear: the reference guide says that the behavior *SHOULD BE* (but is not yet) this: Python 3.3.0 >>> {print("a"):print("b")} a b {None: None} >>> d = {} >>> d[print("a")] = print("b") b a >>> Is

Re: [Python-Dev] urlretrieve regression no.2, now in Python 3.3

2012-11-07 Thread Terry Reedy
On 11/7/2012 5:57 AM, anatoly techtonik wrote: urlretrieve has a callback parameter, which takes function with the following prototype: def callback(block_number, block_size, total_size): pass Where block_size was constant and block_size*block_number gave an exact number of transferred

Re: [Python-Dev] problems building python2.7

2012-11-09 Thread Terry Reedy
On 11/9/2012 5:57 AM, Chris Withers wrote: On 09/11/2012 10:52, Michael Foord wrote: However, I can't find the python it's built... It should be python.exe (yes really). Hah! Should http://docs.python.org/devguide/ be updated to reflect this or does this only affect Mac OS? The devguide

Re: [Python-Dev] performance of {} versus dict()

2012-11-14 Thread Terry Reedy
On 11/14/2012 4:12 AM, Chris Withers wrote: To somewhat paraphrase: ''' I prefer 'dict(a=1,b=2,c=3,d=4,e=5,f=6,g=7)' to "{'a':1,'b':2,'c':3,'d':4,'e':5,'f':6,'g':7}". I am sad that the former takes +-2 times as long to run (in 2.7). Is the difference about the same in 3.x? What can we do to speed

Re: [Python-Dev] performance of {} versus dict(), de fmd(**kw): return kw trumps all ; -)

2012-11-15 Thread Terry Reedy
On 11/15/2012 9:58 AM, Stefan Behnel wrote: Greg Ewing, 15.11.2012 11:48: mar...@v.loewis.de wrote: It's faster than calling dict() because the dict code will create a second dictionary, and discard the keywords dictionary. Perhaps in the case where dict() is called with keyword args only, it

Re: [Python-Dev] externals?

2012-11-18 Thread Terry Reedy
On 11/18/2012 12:05 PM, Brian Curtin wrote: On Sun, Nov 18, 2012 at 6:18 AM, wrote: Zitat von Armin Rigo : Or have all versions in the same repo as usual (with branches), but have hg subrepos point to different repos: ones extracted from the main repo by containing only the correct branch.

Re: [Python-Dev] type vs. class terminology

2012-11-30 Thread Terry Reedy
On 11/29/2012 11:55 PM, Eli Bendersky wrote: On Sun, Nov 25, 2012 at 9:01 PM, Chris Jerdonek mailto:chris.jerdo...@gmail.com>> wrote: I would like to know when we should use "class" in the Python 3 documentation, and when we should use "type." Are these terms synonymous in Python 3,

Re: [Python-Dev] Keyword meanings [was: Accept just PEP-0426]

2012-12-05 Thread Terry Reedy
On 12/5/2012 10:12 PM, Daniel Holth wrote: Makes sense. How about calling it Replacement. 0 or 1? Replacement (optional) :: Indicates that this project is no longer being developed. The named project provides a drop-in replacement. A version declaration may be supplied and

Re: [Python-Dev] More compact dictionaries with faster iteration

2012-12-10 Thread Terry Reedy
On 12/10/2012 1:38 PM, PJ Eby wrote: On Mon, Dec 10, 2012 at 1:01 PM, Armin Rigo wrote: On Mon, Dec 10, 2012 at 5:16 PM, PJ Eby wrote: On the other hand, this would also make a fast ordered dictionary subclass possible, just by not using the free list for additions, combined with periodic com

[Python-Dev] Guido, Dropbox, and Python

2012-12-10 Thread Terry Reedy
For those who have not heard, Guido left Google Friday and starts at Dropbox in January. (I hope you enjoy the break in between ;-). https://twitter.com/gvanrossum/status/277126763295944705 https://tech.dropbox.com/2012/12/welcome-guido/ My question, Guido, is how this will affect Python develo

Re: [Python-Dev] Draft PEP for time zone support.

2012-12-12 Thread Terry Reedy
On 12/12/2012 11:53 AM, Guido van Rossum wrote: Bingo. As long as the recipe to update is clear, most users can ignore this, because the countries about which they care don't change DST rules often enough for it to matter. When it does matter, they'll know (changing the DST rules is something th

Re: [Python-Dev] Draft PEP for time zone support.

2012-12-12 Thread Terry Reedy
On 12/12/2012 10:56 AM, Lennart Regebro wrote: It seems like calling get_timezone() with an unknown timezone should just throw ValueError, not necessarily some custom Exception? That could very well be. What are others opinions on this? ValueError. That is what it is. Nothing special here.

Re: [Python-Dev] Draft PEP for time zone support.

2012-12-12 Thread Terry Reedy
On 12/12/2012 7:27 PM, Brian Curtin wrote: On Wed, Dec 12, 2012 at 6:10 PM, MRAB wrote: On 2012-12-12 23:33, Lennart Regebro wrote: On Thu, Dec 13, 2012 at 12:23 AM, Terry Reedy wrote: As a Windows user, I would like there to be one tz data file used by all Python versions on my machine

Re: [Python-Dev] Draft PEP for time zone support.

2012-12-13 Thread Terry Reedy
On 12/13/2012 1:06 AM, Lennart Regebro wrote: On Thu, Dec 13, 2012 at 2:24 AM, Terry Reedy wrote: Or ask the user where to put it. If we ask where it should be installed, then we need a registry setting for that Right. So I think that asking is not an option at all. It either goes in

Re: [Python-Dev] Draft PEP for time zone support.

2012-12-13 Thread Terry Reedy
On 12/13/2012 4:07 AM, Lennart Regebro wrote: On Thu, Dec 13, 2012 at 9:22 AM, Terry Reedy wrote: On 12/13/2012 1:06 AM, Lennart Regebro wrote: All in all I would say I would prefer to install this per Python. Then explicit update requires multiple downloads or copying. This is a violation

Re: [Python-Dev] Downloads page: Which version of Python should be listed first?

2012-12-14 Thread Terry Reedy
On 12/13/2012 4:14 PM, Ross Lagerwall wrote: On Fri, Dec 14, 2012 at 07:57:52AM +1100, Chris Angelico wrote: The default version shown on http://docs.python.org/ is now 3.3.0, which I think is a Good Thing. However, http://python.org/download/ puts 2.7 first, and says: """If you don't know whic

Re: [Python-Dev] Cron /home/docs/build-devguide

2012-12-22 Thread Terry Reedy
On 12/22/2012 3:46 PM, Barry Warsaw wrote: On Dec 22, 2012, at 03:36 PM, Terry Reedy wrote: Actually, I made d...@dinsdale.python.org an acceptable alias so these messages won't just fill up the hold queue of the list. It did get the problem fixed, didn't it? ;) It solved the adm

Re: [Python-Dev] [Python-checkins] cpython (3.3): Issue #16045: add more unit tests for built-in int()

2012-12-23 Thread Terry Reedy
+# For example, PyPy 1.9.0 raised TypeError for these cases because it +# expects x to be a string if base is given. +@support.cpython_only +def test_base_arg_with_no_x_arg(self): +self.assertEquals(int(base=6), 0) +# Even invalid bases don't raise an exception. +

Re: [Python-Dev] [Python-checkins] cpython (3.3): Issue #16045: add more unit tests for built-in int()

2012-12-23 Thread Terry Reedy
On 12/23/2012 4:47 PM, Chris Jerdonek wrote: On Sun, Dec 23, 2012 at 12:03 PM, Terry Reedy wrote: +# For example, PyPy 1.9.0 raised TypeError for these cases because it +# expects x to be a string if base is given. +@support.cpython_only +def test_base_arg_with_no_x_arg(self

Re: [Python-Dev] Is it possible to switch into the context of a child-process, spawned by "subprocess" module?

2012-12-24 Thread Terry Reedy
On 12/24/2012 2:57 AM, Ajay Garg wrote: Hi all. This is more of knowing whether something is possible in the core python architecture; hence the question to this mailing-list :) The pydev list is for discussion of development of future Python, not for how to use current Python. Usage question

Re: [Python-Dev] Draft PEP for time zone support.

2012-12-28 Thread Terry Reedy
On 12/28/2012 1:02 PM, Lennart Regebro wrote: On Thu, Dec 20, 2012 at 5:43 PM, Barry Warsaw mailto:ba...@python.org>> wrote: That would be `class UnknownTimeZoneError(ValueError, TimeZoneError)`. As of today, in Pytz, UnknownTimeZoneError in fact subclasses KeyError. Any opinions against

Re: [Python-Dev] PEP 431 Time zone support improvements - Update

2012-12-29 Thread Terry Reedy
On 12/29/2012 3:16 PM, Lennart Regebro wrote: Yes, but a comprehensible error message is useful even if somebody messed up the system/configuration. Just reuse whatever exception type you create and add a sensible message. Hopefully, it will never be seen. -- Terry Jan Reedy __

Re: [Python-Dev] test failed: test_urlwithfrag

2013-01-04 Thread Terry Reedy
On 1/4/2013 5:59 PM, Elli Lola wrote: Dear python team, I never used python before and installed it today the first time, so I have no idea what to do about this failure: This current-version usage question should have been directed to python-list. pydev is only for discussion of future versi

Re: [Python-Dev] Point of building without threads?

2013-01-10 Thread Terry Reedy
On 1/10/2013 8:54 AM, Nick Coghlan wrote: On Wed, Jan 9, 2013 at 7:01 AM, Yury V. Zaytsev wrote: Anyways, the point is that it's a recurrent problem, and we hit it every single time with each new machine, so I hope you can understand why I decided to post, even though the original message appea

Re: [Python-Dev] fork or exec?

2013-01-11 Thread Terry Reedy
On 1/11/2013 2:25 AM, Ben Leslie wrote: Python is not UNIX, but I think if you are directly using the POSIX interfaces they should work (more or less) the same way the would if you were writing a C program. (Some of us still use Python to prototype things that will later be converted to C!). I

Re: [Python-Dev] DLLs folder on Windows

2013-01-15 Thread Terry Reedy
On 1/15/2013 6:21 PM, Piotr Dobrogost wrote: I'm curious how dlls from the DLLs folder on Windows are being loaded? As they are not placed in the same folder where python.exe resides I guess they must be loaded by giving the path explicitly but I'm not sure. They are in .../DLLs, which is in s

<    18   19   20   21   22   23   24   25   26   >