Re: [Python-Dev] Python3: speed efficiency vs user friendliness (my first experience)

2011-03-23 Thread Nick Coghlan
On Thu, Mar 24, 2011 at 6:13 AM, Terry Reedy wrote: > Could speed ever really be an issue for print to screen? Definitely, especially on Windows. Just minimising the console window can speed up a Windows console app enormously. Cheers, Nick. -- Nick Coghlan   |   ncogh...@gmail.com   |   Brisb

Re: [Python-Dev] Python3: speed efficiency vs user friendliness (my first experience)

2011-03-23 Thread Lennart Regebro
On Wed, Mar 23, 2011 at 13:01, Steven D'Aprano wrote: > But the improvement is exactly what Anatoly is talking about: it's an > improvement in speed over user convenience. If all you are doing is > iterating over a moderately-sized dictionary, you probably don't care > whether items() etc. returns

Re: [Python-Dev] Python3: speed efficiency vs user friendliness (my first experience)

2011-03-23 Thread Terry Reedy
On 3/23/2011 8:58 AM, Nick Coghlan wrote: On Tue, Mar 22, 2011 at 9:57 PM, anatoly techtonik wrote: Python 3 actually chose *cross-platform consistency* over user convenience when switching away from the platform IO implementations. Given that print acted differently on *nix and Windows, th

Re: [Python-Dev] Python3: speed efficiency vs user friendliness (my first experience)

2011-03-23 Thread Victor Stinner
Le mercredi 23 mars 2011 à 22:58 +1000, Nick Coghlan a écrit : > There are several ways to get unbuffered IO back in a cross-platform > manner, ... Oh, by the way: TextIOWrapper doesn't support unbuffered mode. Only fully buffered and line buffered modes. So print("Test", end='') doesn't display i

Re: [Python-Dev] Python3: speed efficiency vs user friendliness (my first experience)

2011-03-23 Thread Victor Stinner
Le mercredi 23 mars 2011 à 22:58 +1000, Nick Coghlan a écrit : > There are several ways to get unbuffered IO back in a cross-platform > manner, but efficient codec operation means working that way by > default would be a really bad idea. Users may *say* they prefer > convenience over speed, but tha

Re: [Python-Dev] Python3: speed efficiency vs user friendliness (my first experience)

2011-03-23 Thread Nick Coghlan
On Tue, Mar 22, 2011 at 9:57 PM, anatoly techtonik wrote: > For example, now I need to remember that on Windows I need to flush > output every time when I want the result of print() with end!='\n' to > appear on the screen immediately. And for the most of my legacy > scripts I used end='\n' when I

Re: [Python-Dev] Python3: speed efficiency vs user friendliness (my first experience)

2011-03-23 Thread Steven D'Aprano
Lennart Regebro wrote: On Tue, Mar 22, 2011 at 22:12, Steven D'Aprano wrote: The main one that comes to my mind is that other than looping, any time I want to process dict.items() etc I often need to call list() first. "Process" no. If you want it to be a list, yes. This is because they now r

Re: [Python-Dev] Python3: speed efficiency vs user friendliness (my first experience)

2011-03-23 Thread Steven D'Aprano
Greg Ewing wrote: Steven D'Aprano wrote: The main one that comes to my mind is that other than looping, any time I want to process dict.items() etc I often need to call list() first. I don't think that's such a bad thing. It makes it clear that you're performing a more expensive operation th

Re: [Python-Dev] Python3: speed efficiency vs user friendliness (my first experience)

2011-03-23 Thread Stefan Behnel
Steven D'Aprano, 22.03.2011 22:12: anatoly techtonik wrote: I didn't touch Python3 until PyCon, and my first user experience is not really good. I've got a feeling that Python3 became more ugly, because it doesn't allow me to think about the logic anymore, and requires more low-level workarounds

Re: [Python-Dev] Python3: speed efficiency vs user friendliness (my first experience)

2011-03-23 Thread Lennart Regebro
On Tue, Mar 22, 2011 at 22:12, Steven D'Aprano wrote: > The main one that comes to my mind is that other than looping, any time I > want to process dict.items() etc I often need to call list() first. "Process" no. If you want it to be a list, yes. This is because they now return generators, which

Re: [Python-Dev] Python3: speed efficiency vs user friendliness (my first experience)

2011-03-22 Thread Greg Ewing
Steven D'Aprano wrote: The main one that comes to my mind is that other than looping, any time I want to process dict.items() etc I often need to call list() first. I don't think that's such a bad thing. It makes it clear that you're performing a more expensive operation than just looking at t

Re: [Python-Dev] Python3: speed efficiency vs user friendliness (my first experience)

2011-03-22 Thread Steven D'Aprano
anatoly techtonik wrote: I didn't touch Python3 until PyCon, and my first user experience is not really good. I've got a feeling that Python3 became more ugly, because it doesn't allow me to think about the logic anymore, and requires more low-level workarounds even for basic user input/output.

Re: [Python-Dev] Python3: speed efficiency vs user friendliness (my first experience)

2011-03-22 Thread James Y Knight
On Mar 22, 2011, at 7:57 AM, anatoly techtonik wrote: > For example, now I need to remember that on Windows I need to flush > output every time when I want the result of print() with end!='\n' to > appear on the screen immediately. And for the most of my legacy > scripts I used end='\n' when I want

[Python-Dev] Python3: speed efficiency vs user friendliness (my first experience)

2011-03-22 Thread anatoly techtonik
I didn't touch Python3 until PyCon, and my first user experience is not really good. I've got a feeling that Python3 became more ugly, because it doesn't allow me to think about the logic anymore, and requires more low-level workarounds even for basic user input/output. For example, now I need to