Re: [Python-Dev] Summary of 2 years of Python fuzzing

2010-01-27 Thread Neal Norwitz
On Mon, Jan 25, 2010 at 2:34 PM, Victor Stinner victor.stin...@haypocalc.com wrote: Interaction with the Python developers == I open an issue for each bug found in CPython. I describe how to reproduce it and try to write a patch. I have learn to always

Re: [Python-Dev] Summary of 2 years of Python fuzzing

2010-01-27 Thread Ben Finney
Neal Norwitz nnorw...@gmail.com writes: On Mon, Jan 25, 2010 at 2:34 PM, Victor Stinner victor.stin...@haypocalc.com wrote: Along with others expressed here, you have my warm thanks, Victor, for your continuing efforts at fuzz testing Python and especially for careful reporting of the

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-01-27 Thread Glenn Linderman
On approximately 1/26/2010 7:35 PM, came the following characters from the keyboard of David Lyon: Glen wrote: So let's say that the .zip file was dropped onto the Desktop or start menu. It would have an icon, then. It would have an icon. But nothing to identify it as a python

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Glenn Linderman
On approximately 1/26/2010 7:50 PM, came the following characters from the keyboard of Cameron Simpson: My point was that I look on python builtins like list and dict as highly optimised, highly efficient facilities. That means that I expect a list to be very very much like a linear array as one

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-01-27 Thread David Lyon
Glen wrote: So let's further say that the .zip file was named .py, instead, but was a .zip internally. So this cures the icon too, maybe you realized that. It takes it to 80% cured. Being the purist that I am I still long for the day when I can see a python package in my file manager with

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-01-27 Thread Michael Foord
On 27/01/2010 11:21, David Lyon wrote: Glen wrote: So let's further say that the .zip file was named .py, instead, but was a .zip internally. So this cures the icon too, maybe you realized that. It takes it to 80% cured. Being the purist that I am I still long

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-01-27 Thread Nick Coghlan
David Lyon wrote: Being the purist that I am I still long for the day when I can see a python package in my file manager with a proper icon. Icons only cost $400 to get done professionally at a graphic artist. That's roughly the same as a round of drinks at a python conference. If a

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-01-27 Thread Nick Coghlan
David Lyon wrote: Glen wrote: So let's further say that the .zip file was named .py, instead, but was a .zip internally. The only one thing I have to say about that is that it makes embedding of .py files recursive. No it doesn't. The mechanisms involved for processing the top-level

Re: [Python-Dev] PyCon Keynote

2010-01-27 Thread Glenn Linderman
Yesterday, I said: On approximately 1/25/2010 9:27 PM, came the following characters from the keyboard of David Lyon: Firstly, it doesn't create create desktop shortcuts - sorry users need those. Where do the programs go? So let's say that the .zip file was dropped onto the Desktop or start

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Nick Coghlan
Cameron Simpson wrote: The proposed change to make pop(0) O(1) involves adding a base offset to the internal list implementation. Doesn't that incur a (small) overhead to _every_ list operation? Doesn't that weaken list as the as efficient as possible implementation of choice for array-like

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-01-27 Thread David Lyon
On 27/01/2010 11:21, Michael Foord wrote: .. If a Python programmer wants to create an application that is properly 'installed' on Windows then the *right* thing to do is to create an installer - and that uses infrastructure not provided by a language, but that is built into Windows. Tools

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Steve Howell
--- On Wed, 1/27/10, Glenn Linderman v+pyt...@g.nevcal.com wrote: As a newcomer to python, I must say that I wouldn't expect a list to be like an array.  I'd expect it more to be like a list... many implementations of lists (linked lists, in particular) make it O(1) to add to the front or

Re: [Python-Dev] PyCon Keynote

2010-01-27 Thread Xavier Morel
On 26 Jan 2010, at 17:09 , Glenn Linderman wrote: Why can't we just be like the rest of the universe and have one icon type for packages and one icon type for applications. Double click them and they get filed in the right place. What platform files things in the right place when you

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Steve Howell
--- On Tue, 1/26/10, Cameron Simpson c...@zip.com.au wrote: From: Cameron Simpson c...@zip.com.au | The idea that CPython should not be improved because it would spoil | programmers strikes me as a thin, even desparate objection. Hey, I even used the word thin to describe my concern!

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-01-27 Thread David Lyon
Nick wrote: The only one thing I have to say about that is that it makes embedding of .py files recursive. No it doesn't. The mechanisms involved for processing the top-level zipfile and those for processing the .py text files within that zipfile are completely different. Well, if it has

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Daniel Stutzbach
On Wed, Jan 27, 2010 at 7:13 AM, Steve Howell showel...@yahoo.com wrote: My concept of Python lists is that they should have at least the same performance characteristics as an ordinary to-do list that you make with pencil, paper, and an eraser. When you complete the first task on your to-do

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-01-27 Thread Nick Coghlan
David Lyon wrote: Installers aren't built into windows. Umm, yeah they are. msi's don't install themselves. Since Python has distutils, and it builds installers, why shouldn't we be using that? (apart from the fact that it is slightly broken) I believe you're confused about what distutils

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Steve Howell
--- On Wed, 1/27/10, Daniel Stutzbach dan...@stutzbachenterprises.com wrote: From: Daniel Stutzbach dan...@stutzbachenterprises.com Subject: Re: [Python-Dev] patch to make list.pop(0) work in O(1) time To: Steve Howell showel...@yahoo.com Cc: python-dev@python.org Date: Wednesday, January

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Stefan Behnel
Glenn Linderman, 27.01.2010 10:13: As a newcomer to python, I must say that I wouldn't expect a list to be like an array. I'd expect it more to be like a list... many implementations of lists (linked lists, in particular) make it O(1) to add to the front or back. An array can be used to

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Antoine Pitrou
Nick Coghlan ncoghlan at gmail.com writes: The big practical concern is actually the memory cost of adding yet another pointer (potentially 8 bytes of data) to every list object, even empty ones. It needn't be, actually. Why? You only need to store this other pointer when you have an

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Antoine Pitrou
Daniel Stutzbach daniel at stutzbachenterprises.com writes: I don't think your analogy works, unless you recopy your to-do lists whenever you complete a task in the middle of the list. I think his analogy suggests that his to-do list is a doubly-linked list ;) Or perhaps an array with lazy

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-01-27 Thread Lennart Regebro
On Wed, Jan 27, 2010 at 14:23, David Lyon david.l...@pythontest.org wrote: We even get to install a python package directly from our browser using this scheme. I don't understand why anybody wouldn't want that. So, go ahead, make it happen. No one is stopping you. -- Lennart Regebro: Python,

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-01-27 Thread Michael Foord
On 27/01/2010 13:04, David Lyon wrote: On 27/01/2010 11:21, Michael Foord wrote: .. If a Python programmer wants to create an application that is properly 'installed' on Windows then the *right* thing to do is to create an installer - and that uses infrastructure not provided by a

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-27 Thread William Dode
Hi (as a simple user), I'd like to know why you didn't followed the same way as V8 Javascript, or the opposite, why for V8 they didn't choose llvm ? I imagine that startup time and memory was also critical for V8. thanks -- William Dodé - http://flibuste.net Informaticien Indépendant

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Steve Howell
--- On Tue, 1/26/10, Guido van Rossum gu...@python.org wrote: From: Guido van Rossum gu...@python.org Subject: Re: [Python-Dev] patch to make list.pop(0) work in O(1) time To: Steve Howell showel...@yahoo.com Cc: Nick Coghlan ncogh...@gmail.com, python-dev@python.org Date: Tuesday, January

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-01-27 Thread David Lyon
Hi Nick, I believe you're confused about what distutils is for. Tell me.. It generates platform independent metadata that can be used to create platform specific installers. It also generates some platform independent Python specific installation formats that are useful for developers, but

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-01-27 Thread P.J. Eby
At 01:08 AM 1/27/2010 -0800, Glenn Linderman wrote: Of course, if you want to create a ZIP named .py package that is an application installer, you could do that, too. It might be handy for the case where not everything in the application can be a .py, .pyc, or .pyo... shared libraries cannot

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-01-27 Thread Lennart Regebro
On Wed, Jan 27, 2010 at 16:24, David Lyon david.l...@pythontest.org wrote: Think how useful it would be to ship Django or Plone from a zip box... Plone has installers, and is very easily installed on Windows, for those who want to try it. For real production installations you don't want that

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Steve Howell
--- On Wed, 1/27/10, John Arbash Meinel john.arbash.mei...@gmail.com wrote: From: John Arbash Meinel john.arbash.mei...@gmail.com Subject: Re: [Python-Dev] patch to make list.pop(0) work in O(1) time To: Steve Howell showel...@yahoo.com Cc: Guido van Rossum gu...@python.org, Nick Coghlan

Re: [Python-Dev] Executing zipfiles and directories (was Re: PyCon Keynote)

2010-01-27 Thread David Lyon
On 27/01/2010 13:04, Michael Foord wrote: Installers aren't built into windows. The infrastructure for building and using msi installers are part of Windows and the Windows development environment. For example: http://msdn.microsoft.com/en-us/library/aa370834%28VS.85%29.aspx

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Daniel Stutzbach
On Wed, Jan 27, 2010 at 9:55 AM, Steve Howell showel...@yahoo.com wrote: Fair enough, but that's still wasteful of memory, keeping around a bunch of None elements because you can't inexpensively delete them. Even if there are many references to it, there is only one None element. -- Daniel

Re: [Python-Dev] Summary of 2 years of Python fuzzing

2010-01-27 Thread Chris Bergstresser
On Wed, Jan 27, 2010 at 2:54 AM, Ben Finney ben+pyt...@benfinney.id.au wrote: Neal Norwitz nnorw...@gmail.com writes: I definitely hope you continue to find and fix problems in Python. It helps everyone who uses Python even those who will never know to thank you. Who knows, someone might even

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Virgil Dupras
On Wed, Jan 27, 2010 at 4:55 PM, Steve Howell showel...@yahoo.com wrote: --- On Wed, 1/27/10, John Arbash Meinel john.arbash.mei...@gmail.com wrote: From: John Arbash Meinel john.arbash.mei...@gmail.com Subject: Re: [Python-Dev] patch to make list.pop(0) work in O(1) time To: Steve Howell

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-27 Thread David Malcolm
On Thu, 2010-01-21 at 14:46 -0800, Jeffrey Yasskin wrote: On Thu, Jan 21, 2010 at 10:09 AM, Hanno Schlichting ha...@hannosch.eu wrote: I'm a relative outsider to core development (I'm just a Plone release manager), but'll allow myself a couple of questions. Feel free to ignore them, if you

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Steve Howell
--- On Wed, 1/27/10, Daniel Stutzbach dan...@stutzbachenterprises.com wrote: From: Daniel Stutzbach dan...@stutzbachenterprises.com Subject: Re: [Python-Dev] patch to make list.pop(0) work in O(1) time To: Steve Howell showel...@yahoo.com Cc: John Arbash Meinel john.arbash.mei...@gmail.com,

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Steve Howell
--- On Wed, 1/27/10, Virgil Dupras hs...@hardcoded.net wrote: Why is this thread still going? It seems to me that the case for this change is very weak. Lists, like dicts and tuples, are used *everywhere* and in *vast* quantities. Making them grow by 4 or 8 bytes each for such a corner

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-27 Thread Collin Winter
Hi William, On Wed, Jan 27, 2010 at 7:26 AM, William Dode w...@flibuste.net wrote: Hi (as a simple user), I'd like to know why you didn't followed the same way as V8 Javascript, or the opposite, why for V8 they didn't choose llvm ? I imagine that startup time and memory was also critical

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-27 Thread skip
David As a downstream distributor of Python, a major pain point for me David is when Python embeds a copy of a library's source code, rather David than linking against a system library (zlib, libffi and expat David spring to mind): if bugs (e.g. security issues) arise in a

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-27 Thread William Dode
On 27-01-2010, Collin Winter wrote: Hi William, On Wed, Jan 27, 2010 at 7:26 AM, William Dode w...@flibuste.net wrote: Hi (as a simple user), I'd like to know why you didn't followed the same way as V8 Javascript, or the opposite, why for V8 they didn't choose llvm ? I imagine that

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-27 Thread Collin Winter
Hi David, On Wed, Jan 27, 2010 at 8:37 AM, David Malcolm dmalc...@redhat.com wrote: [snip] As a downstream distributor of Python, a major pain point for me is when Python embeds a copy of a library's source code, rather than linking against a system library (zlib, libffi and expat spring to

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-27 Thread Collin Winter
Hi William, On Wed, Jan 27, 2010 at 11:02 AM, William Dode w...@flibuste.net wrote: The startup time and memory comsumption are a limitation of llvm that their developers plan to resolve or is it only specific to the current python integration ? I mean the work to correct this is more on U-S

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Martin v. Löwis
Lists are indeed used *everywhere* and *vast* quantities, which is why optimizations on list operations are worthwhile to pursue. Unfortunately, the proposed change is a pessimisation, not an optimisation. We probably shouldn't discuss it further, at least not until a PEP gets written by its

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Martin v. Löwis
In my mind Python's lists should have the same performance characteristics as the paper list (or better). I think you'll have to adjust your mind then. People have proposed various data structures that *do* work efficiently as paper lists. So if you want a paper list, use one of them, rather

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-27 Thread Jeffrey Yasskin
On Wed, Jan 27, 2010 at 11:16 AM, Collin Winter collinwin...@google.com wrote: We absolutely do not want CPython to include a copy of LLVM in its source tree. Unladen Swallow has done this to make it easier to pick up changes to LLVM's codebase as we make them, but this is not a viable model

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Steve Howell
--- On Wed, 1/27/10, Antoine Pitrou solip...@pitrou.net wrote: From: Antoine Pitrou solip...@pitrou.net Subject: Re: [Python-Dev] patch to make list.pop(0) work in O(1) time To: python-dev@python.org Date: Wednesday, January 27, 2010, 6:15 AM Nick Coghlan ncoghlan at gmail.com writes:

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-27 Thread David Malcolm
On Wed, 2010-01-27 at 11:34 -0800, Jeffrey Yasskin wrote: On Wed, Jan 27, 2010 at 11:16 AM, Collin Winter collinwin...@google.com wrote: We absolutely do not want CPython to include a copy of LLVM in its source tree. Unladen Swallow has done this to make it easier to pick up changes to

Re: [Python-Dev] Summary of 2 years of Python fuzzing

2010-01-27 Thread Ben Finney
Chris Bergstresser ch...@subtlety.com writes: On Wed, Jan 27, 2010 at 2:54 AM, Ben Finney ben+pyt...@benfinney.id.au wrote: Neal Norwitz nnorw...@gmail.com writes: Who knows, someone might even write a book about Fusil someday about a topic as obscure as Beautiful Testing. :-) Your

Re: [Python-Dev] PEP 3146: Merge Unladen Swallow into CPython

2010-01-27 Thread Nick Lewycky
On 27 January 2010 08:37, David Malcolm dmalc...@redhat.com wrote: On Thu, 2010-01-21 at 14:46 -0800, Jeffrey Yasskin wrote: On Thu, Jan 21, 2010 at 10:09 AM, Hanno Schlichting ha...@hannosch.eu wrote: I'm a relative outsider to core development (I'm just a Plone release manager),

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Antoine Pitrou
Le mercredi 27 janvier 2010 à 11:49 -0800, Steve Howell a écrit : A slightly more sane alternative would be to leave ob_size and ob_item alone with their current semantics, and then replace allocated with self-excess, where self-excess == excess_above * 256 + excess_below. Or we could use

[Python-Dev] Mercurial migration: help needed

2010-01-27 Thread Martin v. Löwis
This is a repost from a posting I sent last August. One of the issues (the hg-eol extension) is largely resolved, so I'm only asking for help on the other issue. In this thread, I'd like to collect things that ought to be done but where Dirkjan has indicated that he would prefer if somebody else

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Steve Howell
--- On Wed, 1/27/10, Antoine Pitrou solip...@pitrou.net wrote: From: Antoine Pitrou solip...@pitrou.net Subject: Re: [Python-Dev] patch to make list.pop(0) work in O(1) time To: python-dev@python.org Date: Wednesday, January 27, 2010, 12:41 PM Le mercredi 27 janvier 2010 à 11:49 -0800,

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Raymond Hettinger
On Jan 27, 2010, at 11:38 AM, Martin v. Löwis wrote: Lists are indeed used *everywhere* and *vast* quantities, which is why optimizations on list operations are worthwhile to pursue. Unfortunately, the proposed change is a pessimisation, not an optimisation. We probably shouldn't discuss

[Python-Dev] O(1) random access to deque? (Re: patch to make list.pop(0) work in O(1) time)

2010-01-27 Thread Nick Coghlan
Steve Howell wrote: There is also the possibility that my initial patch can be refined by somebody smarter than myself to eliminate the particular tradeoff. In fact, Antoine Pitrou already suggested an approach, although I agree that it kind of pushes the boundary of sanity. :) I'm actually

Re: [Python-Dev] O(1) random access to deque? (Re: patch to make list.pop(0) work in O(1) time)

2010-01-27 Thread Alex Gaynor
On Wed, Jan 27, 2010 at 4:50 PM, Nick Coghlan ncogh...@gmail.com wrote: Steve Howell wrote: There is also the possibility that my initial patch can be refined by somebody smarter than myself to eliminate the particular tradeoff. In fact, Antoine Pitrou already suggested an approach, although I

Re: [Python-Dev] O(1) random access to deque? (Re: patch to make list.pop(0) work in O(1) time)

2010-01-27 Thread Daniel Stutzbach
On Wed, Jan 27, 2010 at 3:50 PM, Nick Coghlan ncogh...@gmail.com wrote: I'm actually wondering if you could apply some of the implementation strategies discussed here to grant O(1) random access to arbitrary elements of a deque. I haven't looked at the deque code in a long time, but I

Re: [Python-Dev] O(1) random access to deque? (Re: patch to make list.pop(0) work in O(1) time)

2010-01-27 Thread Raymond Hettinger
Are you free to chat about this in IRC? I completely unconvinced that there are use cases for wanting face random access to the i-th element of a large deque that is changing sizes on each end. The meaning of the 20th index changes as the data moves. It becomes pointless to store indices to

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Daniel Stutzbach
On Wed, Jan 27, 2010 at 3:49 PM, Raymond Hettinger raymond.hettin...@gmail.com wrote: Also, am not sure if this affects psyco or the other implementations such as Jython which may implement lists in terms of existing Java containers. Or Unladen Swallow. I'm -1 on mucking with any of the

Re: [Python-Dev] O(1) random access to deque? (Re: patch to make list.pop(0) work in O(1) time)

2010-01-27 Thread Nick Coghlan
Alex Gaynor wrote: I don't see how that's possible. The linked list is a pretty well known data structure and arbitrary lookups are O(n) in it. Using the unrolled-linked-list data structure python uses you can make it faster by a constant factor, but not O(1). There are other structures

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Steve Howell
--- On Wed, 1/27/10, Raymond Hettinger raymond.hettin...@gmail.com wrote: From: Raymond Hettinger raymond.hettin...@gmail.com Subject: Re: [Python-Dev] patch to make list.pop(0) work in O(1) time To: Martin v. Löwis mar...@v.loewis.de Cc: Steve Howell showel...@yahoo.com,

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Antoine Pitrou
Raymond Hettinger raymond.hettinger at gmail.com writes: AFAICT, the performance of the proposal: * increases space requirements by a small fixed amount Well, given my proposal (assuming it turns out ok) it doesn't. * s.append() performance slightly degraded. Why? * the resize

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Jeffrey Yasskin
On Wed, Jan 27, 2010 at 2:14 PM, Daniel Stutzbach dan...@stutzbachenterprises.com wrote: On Wed, Jan 27, 2010 at 3:49 PM, Raymond Hettinger raymond.hettin...@gmail.com wrote: Also, am not sure if this affects psyco or the other implementations such as Jython which may implement lists in

Re: [Python-Dev] O(1) random access to deque? (Re: patch to make list.pop(0) work in O(1) time)

2010-01-27 Thread Maxim Khitrov
On Wed, Jan 27, 2010 at 5:06 PM, Daniel Stutzbach dan...@stutzbachenterprises.com wrote: On Wed, Jan 27, 2010 at 3:50 PM, Nick Coghlan ncogh...@gmail.com wrote: I'm actually wondering if you could apply some of the implementation strategies discussed here to grant O(1) random access to

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Steve Howell
From: Antoine Pitrou solip...@pitrou.net raymond.hettinger at gmail.com writes: AFAICT, the performance of the proposal: * increases space requirements by a small fixed amount Well, given my proposal (assuming it turns out ok) it doesn't. * s.append() performance slightly

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Raymond Hettinger
On Jan 27, 2010, at 2:56 PM, Steve Howell wrote: --- On Wed, 1/27/10, Raymond Hettinger raymond.hettin...@gmail.com wrote: From: Raymond Hettinger raymond.hettin...@gmail.com Subject: Re: [Python-Dev] patch to make list.pop(0) work in O(1) time To: Martin v. Löwis mar...@v.loewis.de Cc:

[Python-Dev] Restore the warning about mktemp now that DeprecationWarnings are silenced

2010-01-27 Thread Ezio Melotti
I noticed that in the py3k doc 'mktemp' is marked as deprecated since Python 2.3 [1], but the function is still there and doesn't raise any warning. Looking at the source I found out that there is a warning, but it is commented out [2], the reason being because they are too annoying. There was

Re: [Python-Dev] O(1) random access to deque? (Re: patch to make list.pop(0) work in O(1) time)

2010-01-27 Thread Maciej Fijalkowski
FWIW, deque indexing for small deques is already O(1) and somewhat fast.  You only get O(n) degradation (with a small contant factor) on large deques. Hi. For small dequeues (smaller than a constant), you have to have O(1) operations, by definition :-) Cheers, fijal

Re: [Python-Dev] O(1) random access to deque? (Re: patch to make list.pop(0) work in O(1) time)

2010-01-27 Thread Raymond Hettinger
On Jan 27, 2010, at 3:55 PM, Maciej Fijalkowski wrote: FWIW, deque indexing for small deques is already O(1) and somewhat fast. You only get O(n) degradation (with a small contant factor) on large deques. Hi. For small dequeues (smaller than a constant), you have to have O(1)

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Steve Howell
--- On Wed, 1/27/10, Raymond Hettinger raymond.hettin...@gmail.com wrote: From: Raymond Hettinger raymond.hettin...@gmail.com * the current design encourages people to use the right data structure for a given need.  the proposed change makes the trades-off murky and implementation

[Python-Dev] scripts, applets, and applications (Was Re: PyCon Keynote)

2010-01-27 Thread Ron Adam
David Lyon wrote: Nick Coghlan: I'd like to see Python 3+ be more suitable for full distributable applications over 2.X and earlier. Out of curiousity, have you tried experimenting with the zipfile execution capabilities in 2.6/3.1? A major part of that was to make multi-file Python

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Alex Gaynor
On Wed, Jan 27, 2010 at 11:30 PM, Steve Howell showel...@yahoo.com wrote: --- On Wed, 1/27/10, Raymond Hettinger raymond.hettin...@gmail.com wrote: From: Raymond Hettinger raymond.hettin...@gmail.com * the current design encourages people to use the right data structure for a given need.  

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Guido van Rossum
On Wed, Jan 27, 2010 at 8:30 PM, Steve Howell showel...@yahoo.com wrote:  I am not sure why Python lists get all the syntax sugar and promotion over deque, when in reality, Python lists implement a pretty useless data structure.  Python lists are a glorification of a C array built on top of a

Re: [Python-Dev] scripts, applets, and applications (Was Re: PyCon Keynote)

2010-01-27 Thread Eric Smith
This discussion probably belongs on the distutils list. Ron Adam wrote: Can I make my efforts in developing a (module, package, script, or application) a lot easier if I keep certain things in mind? Are there any best practices I should keep in mind if I intend to distribute my work? Are

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Steve Howell
--- On Wed, 1/27/10, Alex Gaynor alex.gay...@gmail.com wrote: Python lists implement a pretty useless data structure It's very difficult for ideas to gain traction when they contain such useless, and obviously wrong, rhetoric.  There's an enormous body of code out there that begs to

Re: [Python-Dev] scripts, applets, and applications (Was Re: PyCon Keynote)

2010-01-27 Thread Ron Adam
Eric Smith wrote: This discussion probably belongs on the distutils list. Yes, the discussion should be. I possibly should clarify that this is a list of questions that are of interest as a topic and did not intend for them to be answered here. I tried not to go into specific details for

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Guido van Rossum
On Wed, Jan 27, 2010 at 8:46 PM, Steve Howell showel...@yahoo.com wrote: The statement was meant 99% tongue in cheek.  Like probably 99.99% of Python programmers, I use lists all the time; that's why I want them to be more versatile. There's also a 1% element of truth to the statement.  To

Re: [Python-Dev] patch to make list.pop(0) work in O(1) time

2010-01-27 Thread Cameron Simpson
On 27Jan2010 23:08, Nick Coghlan ncogh...@gmail.com wrote: | Cameron Simpson wrote: | The proposed change to make pop(0) O(1) involves adding a base offset | to the internal list implementation. Doesn't that incur a (small) | overhead to _every_ list operation? Doesn't that weaken list as the |

Re: [Python-Dev] Restore the warning about mktemp now that DeprecationWarnings are silenced

2010-01-27 Thread Brett Cannon
On Wed, Jan 27, 2010 at 15:54, Ezio Melotti ezio.melo...@gmail.com wrote: I noticed that in the py3k doc 'mktemp' is marked as deprecated since Python 2.3 [1], but the function is still there and doesn't raise any warning. Looking at the source I found out that there is a warning, but it is

Re: [Python-Dev] Summary of 2 years of Python fuzzing

2010-01-27 Thread Neal Norwitz
On Wed, Jan 27, 2010 at 11:58 AM, Ben Finney ben+pyt...@benfinney.id.au wrote: Chris Bergstresser ch...@subtlety.com writes: On Wed, Jan 27, 2010 at 2:54 AM, Ben Finney ben+pyt...@benfinney.id.au wrote: Neal Norwitz nnorw...@gmail.com writes: Who knows, someone might even write a book