Re: [Python-Dev] Unordered tuples/lists

2010-07-14 Thread Raymond Hettinger
On May 20, 2010, at 10:35 AM, Martin v. Löwis wrote: >> I think it'd be useful enough to go in the standard library. Now that >> there's a sample implementation, should I still try to demonstrate why I >> believe it's worth adding to the stdlib and get support? > > Most definitely. Just in case

Re: [Python-Dev] str(memoryview('abc')) != 'abc' in Python 2.7

2010-07-14 Thread Raymond Hettinger
On Jul 14, 2010, at 3:43 PM, M.-A. Lemburg wrote: > Is this intended or should I open a bug report for it: > m = memoryview('abc') m == 'abc' > True str(m) == 'abc' > False str(m) > '' > > I would have expected str(m) == 'abc'. That is also my expectation. A memoryview obj

Re: [Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

2010-07-14 Thread Terry Reedy
On 7/14/2010 7:32 PM, Tim Peters wrote: [Nick Coghlan] You're right, I was misremembering how SequenceMatcher works. Terry's summary of the situation seems correct to me - adding a new flag to the constructor signature would mean we're taking a silent failure ("the heuristic makes my code give

Re: [Python-Dev] importlib

2010-07-14 Thread Brett Cannon
On Wed, Jul 14, 2010 at 13:01, Antoine Pitrou wrote: > On Wed, 14 Jul 2010 12:33:55 -0700 > Brett Cannon wrote: >> >> So I started writing benchmark code in anticipation of needing to prove a >> minimal performance difference to justify bootstrapping importlib. Right now >> it only compares impor

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Neil Hodgson
Stephen J. Turnbull: > But it's very important to be able to *move* tabs across windows or > panes.  ... > In many apps, however, you would have to select the foo.c tab, close > it, bring up a new window, and open foo.c using the long path > (presumably with a file browser interface, but often eno

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Stephen J. Turnbull
Guilherme Polo writes: > Adding tabs doesn't necessarily mean a single window, you should be > able to continue using multiple windows with single tabs if that is > your preference. But it's very important to be able to *move* tabs across windows or panes. For example, in XEmacs this is a som

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Guilherme Polo
2010/7/14 Greg Ewing : > Giampaolo Rodolà wrote: >> >> One of the main problems with IDLE is the lack of tabs for editing >> multiple files within the same window. > > While tabs seem to work well for web browsing, I'm not so > sure about using them for source editing. Often I want to > display two

Re: [Python-Dev] versioned .so files for Python 3.2

2010-07-14 Thread Barry Warsaw
On Jun 25, 2010, at 08:35 AM, Nick Coghlan wrote: >I like the idea, but I think summarising the rest of this discussion >in its own (relatively short) PEP would be good (there are a few >things that are tricky - exact versioning scheme, PEP 384 forward >compatibility, impact on distutils, articula

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Greg Ewing
Nick Coghlan wrote: I use tabbed editors all the time (Kate, Notepad++) and find them to be excellent. Tastes will obviously vary though, since there are even people out there that use vim and emacs voluntarily ;) It's probably all right if you have the ability to move tabs from one window to

Re: [Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

2010-07-14 Thread Tim Peters
[Nick Coghlan] > You're right, I was misremembering how SequenceMatcher works. > > Terry's summary of the situation seems correct to me - adding a new > flag to the constructor signature would mean we're taking a silent > failure ("the heuristic makes my code give the wrong answer on 2.7.0") > and

Re: [Python-Dev] str(memoryview('abc')) != 'abc' in Python 2.7

2010-07-14 Thread Nick Coghlan
I wouldn't assume so - memoryview is meant to eventually support more than just 1-D views of contiguous memory (see PEP 3118), so that conversion doesn't seem intuitive to me. Cheers, Nick. -- Nick Coghlan   |   ncogh...@gmail.com   |   Brisbane, Australia ___

Re: [Python-Dev] How to spell PyInstance_NewRaw in py3k?

2010-07-14 Thread Alexander Belopolsky
I am reposting the same question again because it seems to have gone unnoticed. Antoine Pitrou and I had a brief discussion on the tracker, but did not reach an agreement on whether a more elaborate code is needed to replace PyInstance_NewRaw than a simple type->tp_alloc() call. I have reviewed t

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Nick Coghlan
On Thu, Jul 15, 2010 at 9:26 AM, Greg Ewing wrote: > Giampaolo Rodolà wrote: >> >> One of the main problems with IDLE is the lack of tabs for editing >> multiple files within the same window. > > While tabs seem to work well for web browsing, I'm not so > sure about using them for source editing.

Re: [Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

2010-07-14 Thread Nick Coghlan
On Thu, Jul 15, 2010 at 6:40 AM, Tim Peters wrote: > The call in question here is the constructor (__init__), so there's no > real difference between "on the object" and "per call" in this case. You're right, I was misremembering how SequenceMatcher works. Terry's summary of the situation seems

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Greg Ewing
Giampaolo Rodolà wrote: One of the main problems with IDLE is the lack of tabs for editing multiple files within the same window. While tabs seem to work well for web browsing, I'm not so sure about using them for source editing. Often I want to display two or more files side by side, which can

Re: [Python-Dev] python-checkins replies

2010-07-14 Thread Nick Coghlan
On Thu, Jul 15, 2010 at 5:22 AM, Brett Cannon wrote: > Actually, I probably wouldn't. =) When it gets to explicit code, a design > decision has been made, so I do not need to worry about involving the > general public in some low-level technical discussion that won't impact > them. Yep, that's my

Re: [Python-Dev] More C API abstraction for user defined types

2010-07-14 Thread Nick Coghlan
On Wed, Jul 14, 2010 at 11:50 PM, Petre Galan wrote: > No. The right interface is PyNumber_Long. The purpose of the PyNumber_Index > (and > nb_index slot) is as index in slicing. Allowing other objects to say "I'm a real integer, treat me as one" is exactly what the nb_index slot is for (see PEP

[Python-Dev] str(memoryview('abc')) != 'abc' in Python 2.7

2010-07-14 Thread M.-A. Lemburg
Is this intended or should I open a bug report for it: >>> m = memoryview('abc') >>> m == 'abc' True >>> str(m) == 'abc' False >>> str(m) '' I would have expected str(m) == 'abc'. -- Marc-Andre Lemburg eGenix.com Professional Python Services directly from the Source (#1, Jul 15 2010) >>> Pyth

Re: [Python-Dev] notifications form Hg to python-checkins

2010-07-14 Thread Tim Delaney
On 14 July 2010 18:26, Dirkjan Ochtman wrote: > On Wed, Jul 14, 2010 at 10:15, Georg Brandl wrote: > > I also don't think we will see pushes like Tarek's 100+ one very often > for > > Python. Usually changes will be bug fixes, and unless the committer is > > offline I expect them to be pushed i

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Giampaolo Rodolà
http://docs.python.org/dev/whatsnew/2.7.html#ttk-themed-widgets-for-tk Sorry, I realized just now that ttk is already included in Python 2.7 and 3.2. 2010/7/14 Giampaolo Rodolà : > 2010/7/14 Guilherme Polo : >> 2010/7/14 Terry Reedy : >>> On 7/14/2010 2:35 AM, Giampaolo Rodolà wrote: One

Re: [Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

2010-07-14 Thread Tim Peters
[Steven D'Aprano] >> 4. I normally dislike global flags, but this is one time it might be >> less-worse than the alternatives. >> >> Modify SequenceMatcher to test for the value of a global flag, >> defaulting to False if it doesn't exist. >> ... >> The flag will only exist if the caller explicitly

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Giampaolo Rodolà
2010/7/14 Guilherme Polo : > 2010/7/14 Terry Reedy : >> On 7/14/2010 2:35 AM, Giampaolo Rodolà wrote: >>> >>> One of the main problems with IDLE is the lack of tabs for editing >>> multiple files within the same window. >>> Having that alone would be a great improvement. >> >> Yes, the same as tabs

[Python-Dev] importlib

2010-07-14 Thread Antoine Pitrou
On Wed, 14 Jul 2010 12:33:55 -0700 Brett Cannon wrote: > > So I started writing benchmark code in anticipation of needing to prove a > minimal performance difference to justify bootstrapping importlib. Right now > it only compares importing from sys.modules and built-in modules. You can > run it

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Terry Reedy
On 7/14/2010 12:58 PM, Antoine Pitrou wrote: On Wed, 14 Jul 2010 12:34:27 -0400 Terry Reedy wrote: So I can see that pushing to make it a business meeting would not be too welcome. What I would like is an online sprint with a temporary #python-triage channel, with at least one commit-developer

Re: [Python-Dev] Peculiar import code in pickle.py

2010-07-14 Thread Brett Cannon
On Wed, Jul 14, 2010 at 05:15, Nick Coghlan wrote: > On Wed, Jul 14, 2010 at 9:05 PM, Steve Holden wrote: > >> I have stopped fixing bugs related to this in import.c because of the > >> annoying issues it causes and I expect the correct approach to gain > >> traction at some point (plus get impo

Re: [Python-Dev] python-checkins replies

2010-07-14 Thread Brett Cannon
On Wed, Jul 14, 2010 at 01:36, Eric Smith wrote: > On 7/14/2010 4:21 AM, Georg Brandl wrote: > >> Am 13.07.2010 22:29, schrieb Brett Cannon: >> >> Given how high traffic python-checkins is I don't consider >>> that a >>> reasonable place to send follow-up and nor do I con

Re: [Python-Dev] Include datetime.py in stdlib or not?

2010-07-14 Thread Alexander Belopolsky
On Tue, Jul 13, 2010 at 3:52 PM, Alexander Belopolsky wrote: >.. and "import _strptime" had to be moved from function level to > module level after class definitions due to circular dependency of > _strptime on datetime. This turned out to be not such a great idea. Importing _strptime at the mod

Re: [Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

2010-07-14 Thread Terry Reedy
On 7/14/2010 9:45 AM, Nick Coghlan wrote: Code that sets the flag would behave the same on both 2.7.1+ and on 2.7.0, it would just fail to turn the heuristic off in 2.7.0. Antoine Pitrou pointed out on the tracker http://bugs.python.org/issue2986 that such code would *not* 'behave the same'. I

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Guilherme Polo
2010/7/14 Terry Reedy : > On 7/14/2010 2:35 AM, Giampaolo Rodolà wrote: >> >> One of the main problems with IDLE is the lack of tabs for editing >> multiple files within the same window. >> Having that alone would be a great improvement. > > Yes, the same as tabs for browsing was. > > This is first

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Brian Curtin
On Wed, Jul 14, 2010 at 11:34, Terry Reedy wrote: > On 7/14/2010 4:10 AM, Georg Brandl wrote: > > Sure, and if it was work time, we probably would do this ;). As it is >> right now, this is volunteer time, and I would say that we're entitled >> to do whatever helps us getting done the (not alwa

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Terry Reedy
On 7/14/2010 2:35 AM, Giampaolo Rodolà wrote: One of the main problems with IDLE is the lack of tabs for editing multiple files within the same window. Having that alone would be a great improvement. Yes, the same as tabs for browsing was. This is firstly an unlying gui widget set issue. Tk do

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Steve Holden
Terry Reedy wrote: > On 7/14/2010 4:10 AM, Georg Brandl wrote: > >> Sure, and if it was work time, we probably would do this ;). As it is >> right now, this is volunteer time, and I would say that we're entitled >> to do whatever helps us getting done the (not always exciting) work, >> and our IR

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Antoine Pitrou
On Wed, 14 Jul 2010 12:34:27 -0400 Terry Reedy wrote: > > So I can see that pushing to make it a business meeting would not be too > welcome. What I would like is an online sprint with a temporary > #python-triage channel, with at least one commit-developer present. It should be noted that #py

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Terry Reedy
On 7/14/2010 4:10 AM, Georg Brandl wrote: Sure, and if it was work time, we probably would do this ;). As it is right now, this is volunteer time, and I would say that we're entitled to do whatever helps us getting done the (not always exciting) work, and our IRC crap talk, if that's what it is

Re: [Python-Dev] More C API abstraction for user defined types

2010-07-14 Thread Petre Galan
Nick Coghlan gmail.com> writes: > > On Tue, Jul 13, 2010 at 6:44 PM, Mark Dickinson gmail.com> wrote: > > On Mon, Jul 12, 2010 at 10:19 PM, Nick Coghlan gmail.com> wrote: > >> On Tue, Jul 13, 2010 at 3:35 AM, Petre Galan gmail.com> wrote: > >>> ival should not be resolved through PyLong_As

Re: [Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

2010-07-14 Thread Nick Coghlan
On Wed, Jul 14, 2010 at 10:38 PM, Steven D'Aprano wrote: > 4. I normally dislike global flags, but this is one time it might be > less-worse than the alternatives. > > Modify SequenceMatcher to test for the value of a global flag, > defaulting to False if it doesn't exist. > > try: >    disable =

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Mark Lawrence
On 14/07/2010 09:10, Georg Brandl wrote: Am 12.07.2010 00:51, schrieb Mark Lawrence: I have been attempting to fill this hole and have been faced with animosity from people who "hang out" on the python-dev IRC channel. I thought it was a complete and utter waste of space, so I don't intend goi

Re: [Python-Dev] Issue 2986: difflib.SequenceMatcher is partly broken

2010-07-14 Thread Steven D'Aprano
On Wed, 14 Jul 2010 11:45:25 am Terry Reedy wrote: > Summary: adding an autojunk heuristic to difflib without also adding > a way to turn it off was a bug because it disabled running code. > > 2.6 and 3.1 each have, most likely, one final version each. Don't fix > for these but add something to the

Re: [Python-Dev] Peculiar import code in pickle.py

2010-07-14 Thread Nick Coghlan
On Wed, Jul 14, 2010 at 9:05 PM, Steve Holden wrote: >> I have stopped fixing bugs related to this in import.c because of the >> annoying issues it causes and I expect the correct approach to gain >> traction at some point (plus get importlib bootstrapped in so I don't >> have to care about import

Re: [Python-Dev] Peculiar import code in pickle.py

2010-07-14 Thread Steve Holden
Brett Cannon wrote: > > > On Tue, Jul 13, 2010 at 11:34, Alexander Belopolsky > mailto:alexander.belopol...@gmail.com>> > wrote: > > On Tue, Jul 13, 2010 at 1:57 PM, Benjamin Peterson > mailto:benja...@python.org>> wrote: > .. > > No! That's not recommended and a complete hack. T

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Steve Holden
Georg Brandl wrote: > Am 12.07.2010 00:51, schrieb Mark Lawrence: > >> I have been attempting to fill this hole and have been faced with >> animosity from people who "hang out" on the python-dev IRC channel. I >> thought it was a complete and utter waste of space, so I don't intend >> going ba

Re: [Python-Dev] python-checkins

2010-07-14 Thread Martin Geisler
Dirkjan Ochtman writes: > - http://bitbucket.org/mg/commitsigs is another extension, which takes > a different tack to signing (I believe it doesn't sign the commit > metadata, only the file tree, which lets it sign before the commit is > finished, meaning it doesn't take up an extra cset). It d

Re: [Python-Dev] python-checkins replies

2010-07-14 Thread Eric Smith
On 7/14/2010 4:21 AM, Georg Brandl wrote: Am 13.07.2010 22:29, schrieb Brett Cannon: Given how high traffic python-checkins is I don't consider that a reasonable place to send follow-up and nor do I consider it the responsibility of committers to monitor i

Re: [Python-Dev] notifications form Hg to python-checkins

2010-07-14 Thread Dirkjan Ochtman
On Wed, Jul 14, 2010 at 10:15, Georg Brandl wrote: > I also don't think we will see pushes like Tarek's 100+ one very often for > Python.  Usually changes will be bug fixes, and unless the committer is > offline I expect them to be pushed immediately. Depends. If we do feature branches in separat

Re: [Python-Dev] python-checkins replies

2010-07-14 Thread Georg Brandl
Am 13.07.2010 22:29, schrieb Brett Cannon: > Given how high traffic python-checkins is I don't consider that a > reasonable place to send follow-up and nor do I consider it the > responsibility of committers to monitor it. As you said earlier > this >

Re: [Python-Dev] notifications form Hg to python-checkins

2010-07-14 Thread Georg Brandl
Am 14.07.2010 00:00, schrieb Nick Coghlan: > On Wed, Jul 14, 2010 at 7:45 AM, Dirkjan Ochtman wrote: >> On Tue, Jul 13, 2010 at 23:22, Nick Coghlan wrote: >>> No, I meant push. There's a separate discussion where it was pointed >>> out that publishing each commit as a separate email makes >>> pyt

Re: [Python-Dev] Removing IDLE from the standard library

2010-07-14 Thread Georg Brandl
Am 12.07.2010 00:51, schrieb Mark Lawrence: > I have been attempting to fill this hole and have been faced with > animosity from people who "hang out" on the python-dev IRC channel. I > thought it was a complete and utter waste of space, so I don't intend > going back. I agree with everything