Re: [Python-Dev] importlib

2010-07-15 Thread Brett Cannon
On Wed, Jul 14, 2010 at 13:01, Antoine Pitrou solip...@pitrou.net wrote: On Wed, 14 Jul 2010 12:33:55 -0700 Brett Cannon br...@python.org wrote: So I started writing benchmark code in anticipation of needing to prove a minimal performance difference to justify bootstrapping importlib. Right

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

2010-07-15 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] str(memoryview('abc')) != 'abc' in Python 2.7

2010-07-15 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) 'memory at 0x2b2bb6ee26d8' I would have expected str(m) == 'abc'. That is also my expectation. A memoryview

Re: [Python-Dev] Unordered tuples/lists

2010-07-15 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 it

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

2010-07-15 Thread M.-A. Lemburg
Nick Coghlan wrote: 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. In the example I'm passing in a single dimension contiguous memory chunk to memoryview(), so in

Re: [Python-Dev] python-checkins replies

2010-07-15 Thread anatoly techtonik
On Tue, Jul 13, 2010 at 2:42 AM, Michael Foord fuzzy...@voidspace.org.uk wrote: 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 *isn't* in our

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

2010-07-15 Thread Oleg Broytman
On Thu, Jul 15, 2010 at 09:23:06AM +1000, 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 ;) Sorry for being a wet blanket but

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

2010-07-15 Thread Antoine Pitrou
On Wed, 14 Jul 2010 19:24:28 -0400 Alexander Belopolsky alexander.belopol...@gmail.com wrote: 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

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

2010-07-15 Thread Antoine Pitrou
On Thu, 15 Jul 2010 00:43:49 +0200 M.-A. Lemburg m...@egenix.com 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) 'memory at 0x2b2bb6ee26d8' Well, I think this is intended. str(m) is the human-readable

Re: [Python-Dev] importlib

2010-07-15 Thread Nick Coghlan
On Thu, Jul 15, 2010 at 4:06 PM, Brett Cannon br...@python.org wrote: In any case, here my results under a Linux system: $ ./python -m importlib.test.benchmark sys.modules [ 323782 326183 326667 ] best is 326667 Built-in module [ 33600 33693 33610 ] best is 33693 $ ./python -m

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

2010-07-15 Thread Nick Coghlan
On Thu, Jul 15, 2010 at 7:23 PM, Oleg Broytman p...@phd.pp.ru wrote:   Sorry for being a wet blanket but vim implements tabbed windows even in console (text) mode. (-: Oh, I know vim and emacs are actually incredibly powerful once you learn how to use them. I'm just a child of the GUI

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

2010-07-15 Thread Éric Araujo
[Nick] [me] IIRC, you can’t know who pushed without kludgy hackery. [...] Note that the current distutils2 emails to python-checkins already say Tarek Ziade pushed... I looked at mail.py in the hooks repository and learned that hooks get an HGPUSHER variable in their environment. Nice!

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

2010-07-15 Thread Alexander Belopolsky
On Thu, Jul 15, 2010 at 6:29 AM, Antoine Pitrou solip...@pitrou.net wrote: On Wed, 14 Jul 2010 19:24:28 -0400 Alexander Belopolsky alexander.belopol...@gmail.com wrote: ..  This means that Antoine's concern that tomorrow [object_new()] may entail additional operations is not valid  - there is

Re: [Python-Dev] importlib

2010-07-15 Thread anatoly techtonik
On Thu, Jul 15, 2010 at 2:55 PM, Nick Coghlan ncogh...@gmail.com wrote: In any case, here my results under a Linux system: $ ./python -m importlib.test.benchmark sys.modules [ 323782 326183 326667 ] best is 326667 Built-in module [ 33600 33693 33610 ] best is 33693 $ ./python -m

[Python-Dev] Whither 'trunk'

2010-07-15 Thread Terry Reedy
The 'trunk' branch appears to have been frozen 12 days ago when 2.7 was released. I presume py3k is now the main development branch. Correct? There are doc(s) on the site the directed people to the 'trunk' branch. If not updated (as seems from a python-list post today, but I asked the OP),

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

2010-07-15 Thread Ron Adam
On 07/15/2010 07:13 AM, Nick Coghlan wrote: On Thu, Jul 15, 2010 at 7:23 PM, Oleg Broytmanp...@phd.pp.ru wrote: Sorry for being a wet blanket but vim implements tabbed windows even in console (text) mode. (-: Oh, I know vim and emacs are actually incredibly powerful once you learn how

[Python-Dev] profiler decorator - is it worth for inclusion?

2010-07-15 Thread Giampaolo Rodolà
Today I was looking for a quick and dirty way to profile a method of a class. I was thinking that cProfile module had a decorator for this but I was wrong so I decided to write one based on hotshot. Would it be worth for inclusion? #!/usr/bin/env python import hotshot import hotshot.stats

Re: [Python-Dev] profiler decorator - is it worth for inclusion?

2010-07-15 Thread Brian Curtin
On Thu, Jul 15, 2010 at 13:45, Giampaolo Rodolà g.rod...@gmail.com wrote: Today I was looking for a quick and dirty way to profile a method of a class. I was thinking that cProfile module had a decorator for this but I was wrong so I decided to write one based on hotshot. Would it be worth

Re: [Python-Dev] profiler decorator - is it worth for inclusion?

2010-07-15 Thread Giampaolo Rodolà
2010/7/15 Brian Curtin brian.cur...@gmail.com: On Thu, Jul 15, 2010 at 13:45, Giampaolo Rodolà g.rod...@gmail.com wrote: Today I was looking for a quick and dirty way to profile a method of a class. I was thinking that cProfile module had a decorator for this but I was wrong so I decided to

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

2010-07-15 Thread geremy condra
On Thu, Jul 15, 2010 at 5:13 AM, Nick Coghlan ncogh...@gmail.com wrote: On Thu, Jul 15, 2010 at 7:23 PM, Oleg Broytman p...@phd.pp.ru wrote:   Sorry for being a wet blanket but vim implements tabbed windows even in console (text) mode. (-: Oh, I know vim and emacs are actually incredibly

Re: [Python-Dev] importlib

2010-07-15 Thread John Nagle
anatoly techtoniktechto...@gmail.com wrote: What about web-applications? Is that true that for FastCgi or mod_wsgi deamon mode interpreter and application is started only once per say 100 requests? Yes. Only CGI programs reload on every use. FCGI/WSGI programs run more or less forever,

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

2010-07-15 Thread Steve Holden
Neil Hodgson wrote: 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

Re: [Python-Dev] Whither 'trunk'

2010-07-15 Thread Brett Cannon
On Thu, Jul 15, 2010 at 09:19, Terry Reedy tjre...@udel.edu wrote: The 'trunk' branch appears to have been frozen 12 days ago when 2.7 was released. I presume py3k is now the main development branch. Correct? Yes. There are doc(s) on the site the directed people to the 'trunk' branch. If

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

2010-07-15 Thread Amaury Forgeot d'Arc
Hello, 2010/7/15 Barry Warsaw ba...@python.org: The first draft of PEP 3149 is ready for review. I like it! I think it could mention the case where packages are not installed in the canonical directory, but placed elsewhere along the PYTHONPATH. This is how I deploy applications, for example,

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

2010-07-15 Thread geremy condra
On Thu, Jul 15, 2010 at 2:04 PM, Steve Holden st...@holdenweb.com wrote: Neil Hodgson wrote: 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,