Re: Don't feed the troll...

2013-06-29 Thread Ian Kelly
On Thu, Jun 27, 2013 at 12:13 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: So what do you think would be a good approach towards people who are behaving in conflict with this wish of yours? Just bluntly call them worse than the troll or try to approach them in a way that is less

Re: What is the semantics meaning of 'object'?

2013-06-29 Thread Mark Janssen
On 26/06/2013 9:19 AM, Mark Janssen wrote: Did you ever hear of the Glass Bead Game? Which was Hesse's condemnation of the pure-academic-understanding-unbound-by-pragmatic-use approach as mental masturbation, It was not. He was conflicted. On the one hand he knew the enterprise was

Closures in leu of pointers?

2013-06-29 Thread cts . private . yahoo
Hi, I'd like to use closures to set allow a subroutine to set variables in its caller, in leu of pointers. But I can't get it to work. I have the following test pgm, but I can't understand its behaviour: It uses a function p2() from the module modules.closure1b: def p2 (proc): proc

Re: Closures in leu of pointers?

2013-06-29 Thread Fábio Santos
On 29 Jun 2013 10:38, cts.private.ya...@gmail.com wrote: Hi, I'd like to use closures to set allow a subroutine to set variables in its caller, in leu of pointers. But I can't get it to work. I have the following test pgm, but I can't understand its behaviour: It uses a function p2() from

Re: Closures in leu of pointers?

2013-06-29 Thread Peter Otten
cts.private.ya...@gmail.com wrote: I'd like to use closures to set allow a subroutine to set variables in its caller, in leu of pointers. leu? Must be a Fench word ;) But I can't get it to work. I have the following test pgm, but I can't understand its behaviour: It uses a function p2()

Re: Closures in leu of pointers?

2013-06-29 Thread cts . private . yahoo
Well, it would have been French if I had spelled it right - since you force me overcome my laziness, I see I should have spelled it lieu ... Thank you. You reminded me of the (weak) workaround of using arrays and confirmed my suspicion that I although I can read the variable, I won't be able

MeCab UTF-8 Decoding Problem

2013-06-29 Thread fobos3
Hi, I am trying to use a program called MeCab, which does syntax analysis on Japanese text. The problem I am having is that it returns a byte string and if I try to print it, it prints question marks for almost all characters. However, if I try to use .decide, it throws an error. Here is my

Re: Closures in leu of pointers?

2013-06-29 Thread cts . private . yahoo
Alas, one reason it's a weak workaround is that it doesn't work - at least, not how I wish it would: $ cat ptrs x = 34 def p1 (a1): a1[0] += 12 p1 ([x]) print (x) $ python ptrs 34 -- http://mail.python.org/mailman/listinfo/python-list

Re: Closures in leu of pointers?

2013-06-29 Thread Peter Otten
cts.private.ya...@gmail.com wrote: As for python 3 ... nonlocal? I see I'm not alone in picking obnoxious names ... tous chez... Alas, one reason it's a weak workaround is that it doesn't work - at least, not how I wish it would: $ cat ptrs x = 34 def p1 (a1): a1[0] += 12

Re: Closures in leu of pointers?

2013-06-29 Thread cts . private . yahoo
PS: If you're reading this and love the French language -- I am deeply sorry for the pain I'm causing you... It's obviously a team effort... My French ain't so hot, either. I had to google your tout chez until I ran into the explanation: hallo :) also ich gucke super gerne two and a half

Re: Why is the argparse module so inflexible?

2013-06-29 Thread Marcin Szamotulski
On 05:28 Sat 29 Jun , Steven D'Aprano wrote: On Fri, 28 Jun 2013 18:36:37 -0700, Ethan Furman wrote: On 06/27/2013 03:49 PM, Steven D'Aprano wrote: [rant] I think it is lousy design for a framework like argparse to raise a custom ArgumentError in one part of the code, only to

Re: indexerror: list index out of range??

2013-06-29 Thread Dave Angel
On 06/28/2013 11:35 PM, Titiksha wrote: On Friday, June 28, 2013 8:20:28 PM UTC-5, Titiksha wrote: SNIP double-spaced nonsense m=['631138', '601034', '2834', '2908', '64808'] SNIP more double-spaced nonsense ['LAKEFLD 3227,631138\n', 'NOBLES 3013,601034\n']

Re: MeCab UTF-8 Decoding Problem

2013-06-29 Thread Giorgos Tzampanakis
On 2013-06-29, fob...@gmail.com wrote: Hi, I am trying to use a program called MeCab, which does syntax analysis on Japanese text. The problem I am having is that it returns a byte string and if I try to print it, it prints question marks for almost all characters. However, if I try to use

Re: Closures in leu of pointers?

2013-06-29 Thread Michael Torrie
On 06/29/2013 05:44 AM, cts.private.ya...@gmail.com wrote: Alas, one reason it's a weak workaround is that it doesn't work - at least, not how I wish it would: $ cat ptrs x = 34 def p1 (a1): a1[0] += 12 p1 ([x]) print (x) $ python ptrs 34 you'll have to use it

Re: Closures in leu of pointers?

2013-06-29 Thread Michael Torrie
On 06/29/2013 05:21 AM, cts.private.ya...@gmail.com wrote: Thank you. You reminded me of the (weak) workaround of using arrays and confirmed my suspicion that I although I can read the variable, I won't be able to write to it. I still don't understand why not, though... The real problem

Re: MeCab UTF-8 Decoding Problem

2013-06-29 Thread Dave Angel
On 06/29/2013 07:29 AM, fob...@gmail.com wrote: Hi, Using Python 2.7 on Linux, presumably? It'd be better to be explicit. I am trying to use a program called MeCab, which does syntax analysis on Japanese text. The problem I am having is that it returns a byte string and if I try to print

Re: Why is the argparse module so inflexible?

2013-06-29 Thread Roy Smith
In article mailman.3980.1372480662.3114.python-l...@python.org, Terry Reedy tjre...@udel.edu wrote: So a library that behaves like an app is OK? No, Steven is right as a general rule (do not raise SystemExit), but argparse was considered an exception because its purpose is to turn a

Re: Why is the argparse module so inflexible?

2013-06-29 Thread Andrew Berg
On 2013.06.29 09:12, Roy Smith wrote: What is the tracker issue number or url? http://bugs.python.org/issue9938 -- CPython 3.3.2 | Windows NT 6.2.9200 / FreeBSD 9.1 -- http://mail.python.org/mailman/listinfo/python-list

Re: indexerror: list index out of range??

2013-06-29 Thread Mark Lawrence
On 29/06/2013 14:44, Dave Angel wrote: On 06/28/2013 11:35 PM, Titiksha wrote: Since you're using the arrogant and buggy GoogleGroups, this http://wiki.python.org/moin/GoogleGroupsPython. Please don't make comments like this, you'll upset the Python Mailing List Police. -- Steve is going

Re: Closures in leu of pointers?

2013-06-29 Thread Mark Lawrence
On 29/06/2013 13:26, cts.private.ya...@gmail.com wrote: PS: If you're reading this and love the French language -- I am deeply sorry for the pain I'm causing you... It's obviously a team effort... My French ain't so hot, either. I had to google your tout chez until I ran into the

Re: Closures in leu of pointers?

2013-06-29 Thread cts . private . yahoo
I love the title. Reminds me of Ivanhoe ... great time travel. -- http://mail.python.org/mailman/listinfo/python-list

Re: MeCab UTF-8 Decoding Problem

2013-06-29 Thread Terry Reedy
On 6/29/2013 10:02 AM, Dave Angel wrote: On 06/29/2013 07:29 AM, fob...@gmail.com wrote: Hi, Using Python 2.7 on Linux, presumably? It'd be better to be explicit. I am trying to use a program called MeCab, which does syntax analysis on Japanese text. It is generally nice to give a link

Re: MeCab UTF-8 Decoding Problem

2013-06-29 Thread Terry Reedy
On 6/29/2013 11:32 AM, Terry Reedy wrote: I am trying to use a program called MeCab, which does syntax analysis on Japanese text. It is generally nice to give a link when asking about 3rd party software. https://code.google.com/p/mecab/ In this case, nearly all the non-boilerplate text is

Re: Why is the argparse module so inflexible?

2013-06-29 Thread MRAB
On 29/06/2013 06:28, Steven D'Aprano wrote: On Fri, 28 Jun 2013 18:36:37 -0700, Ethan Furman wrote: On 06/27/2013 03:49 PM, Steven D'Aprano wrote: [rant] I think it is lousy design for a framework like argparse to raise a custom ArgumentError in one part of the code, only to catch it

Re: Python Zelda II sequel - game engine works - GPLv2

2013-06-29 Thread elvish . healer
There now is a graph connected roomsystem which provides for a master room with elevators and ropes to climb on. A room in a master room can be easily made out of the file maproomcastleX.py. This is about 10 lines of code. On my blog you can see some pictures

Re: python adds an extra half space when reading from a string or list

2013-06-29 Thread Joshua Landau
On 29 June 2013 03:07, charles benoit feather.duster.kung...@gmail.com wrote: STUFF 1) You haven't asked a question. 2) You posted your code twice. That makes it look a lot harder and longer than it really is. 3) Give us a *minimal* reproducible test case. I currently just get: %~ python2

Re: MeCab UTF-8 Decoding Problem

2013-06-29 Thread MRAB
On 29/06/2013 12:29, fob...@gmail.com wrote: Hi, I am trying to use a program called MeCab, which does syntax analysis on Japanese text. The problem I am having is that it returns a byte string and if I try to print it, it prints question marks for almost all characters. However, if I try to

Re: MeCab UTF-8 Decoding Problem

2013-06-29 Thread Steven D'Aprano
On Sat, 29 Jun 2013 04:29:23 -0700, fobos3 wrote: Hi, I am trying to use a program called MeCab, which does syntax analysis on Japanese text. The problem I am having is that it returns a byte string and if I try to print it, it prints question marks for almost all characters. However, if I

Re: python adds an extra half space when reading from a string or list

2013-06-29 Thread Mark Lawrence
On 29/06/2013 17:05, Joshua Landau wrote: On 29 June 2013 03:07, charles benoit feather.duster.kung...@gmail.com wrote: STUFF 1) You haven't asked a question. 2) You posted your code twice. That makes it look a lot harder and longer than it really is. 3) Give us a *minimal* reproducible test

Re: Closures in leu of pointers?

2013-06-29 Thread Antoon Pardon
Op 29-06-13 16:02, Michael Torrie schreef: The real problem here is that you don't understand how python variables work. And in fact, python does not have variables. It has names that bind to objects. I don't understand why members of this list keep saying this. Sure the variables in python

Re: Closures in leu of pointers?

2013-06-29 Thread rusi
On Saturday, June 29, 2013 10:32:01 PM UTC+5:30, Antoon Pardon wrote: Op 29-06-13 16:02, Michael Torrie schreef: The real problem here is that you don't understand how python variables work. And in fact, python does not have variables. It has names that bind to objects. I don't

Confused approach to Pyinstaller

2013-06-29 Thread darpan6aya
I have a certain GUI program that I built using Python 2.7 and PyQt4. I want to convert it into a standalone windows executable. I went through the docs for Pyinstaller-2.0 and tried several times but I think that I might be on the wrong approach. Here is the structure of my Program.

Re: Closures in leu of pointers?

2013-06-29 Thread Michael Torrie
On 06/29/2013 11:02 AM, Antoon Pardon wrote: Op 29-06-13 16:02, Michael Torrie schreef: The real problem here is that you don't understand how python variables work. And in fact, python does not have variables. It has names that bind to objects. I don't understand why members of this

Re: Closures in leu of pointers?

2013-06-29 Thread Michael Torrie
On 06/29/2013 07:56 AM, Michael Torrie wrote: x = [ 34, ] def test_func( out ): out[0] += 12 test_func(x) print (x) Well, actually print (x[0]) -- http://mail.python.org/mailman/listinfo/python-list

Re: Closures in leu of pointers?

2013-06-29 Thread cts . private . yahoo
:) Thank you guys for saying what I was biting my tongue about (thanks everybody for the help, BTW!). This python-think stuff was starting to get on my nerves - but then it occurred to me that - although having many powerful features - it has so many weird restrictions that it requires a

Re: Closures in leu of pointers?

2013-06-29 Thread Steven D'Aprano
On Sat, 29 Jun 2013 04:21:46 -0700, cts.private.yahoo wrote: Thank you. You reminded me of the (weak) workaround of using arrays I think you mean lists, rather than arrays. Python does have an array type, but it is much more restricted. If you want an indirect reference to a value, the

Re: Closures in leu of pointers?

2013-06-29 Thread Steven D'Aprano
On Sat, 29 Jun 2013 19:02:01 +0200, Antoon Pardon wrote: Op 29-06-13 16:02, Michael Torrie schreef: The real problem here is that you don't understand how python variables work. And in fact, python does not have variables. It has names that bind to objects. I don't understand why

Re: Closures in leu of pointers?

2013-06-29 Thread Michael Torrie
On 06/29/2013 12:37 PM, cts.private.ya...@gmail.com wrote: :) Thank you guys for saying what I was biting my tongue about (thanks everybody for the help, BTW!). Sometimes it's best to state the actual problem you're trying to solve and see if there's a pythonic solution that fits it rather

Re: Closures in leu of pointers?

2013-06-29 Thread Steven D'Aprano
On Sat, 29 Jun 2013 11:37:55 -0700, cts.private.yahoo wrote: :) Thank you guys for saying what I was biting my tongue about (thanks everybody for the help, BTW!). This python-think stuff was starting to get on my nerves - but then it occurred to me that - although having many powerful

Re: Closures in leu of pointers?

2013-06-29 Thread Steven D'Aprano
On Sat, 29 Jun 2013 18:45:30 +, Steven D'Aprano wrote: Python require declarations for local names, but if it did it would probably use local. Oops, I meant *doesn't* require declarations. Sorry for the error. -- Steven -- http://mail.python.org/mailman/listinfo/python-list

Re: Closures in leu of pointers?

2013-06-29 Thread Michael Torrie
On 06/29/2013 12:51 PM, Steven D'Aprano wrote: You are absolutely correct in principle. But in practice, there are ten bazillion C, Pascal, COBOL, and BASIC programmers who understand the word variable to mean a named memory location, for every Smalltalk or Lisp programmer who understands a

Re: Closures in leu of pointers?

2013-06-29 Thread rusi
On Sunday, June 30, 2013 12:21:35 AM UTC+5:30, Steven D'Aprano wrote: On Sat, 29 Jun 2013 19:02:01 +0200, Antoon Pardon wrote: We might as well say that C doesn't have variables, it has names pointing to memory locations or value containers or something like that. AFAICS there is no

Unittest fails to import module

2013-06-29 Thread Martin Schöön
I know the answer to this must be trivial but I am stuck... I am starting on a not too complex Python project. Right now the project file structure contains three subdirectories and two files with Python code: code blablabla.py test blablabla_test.py doc (empty for now)

Re: Closures in leu of pointers?

2013-06-29 Thread Steven D'Aprano
On Sat, 29 Jun 2013 12:35:54 -0600, Michael Torrie wrote: Python's basic data types are immutable. At best we could say they are read-only variables. Python's basic data types are not necessarily immutable. Lists and dicts are not immutable. Being a high-level language, the idea of

Re: Closures in leu of pointers?

2013-06-29 Thread Ian Kelly
On Sat, Jun 29, 2013 at 11:02 AM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Op 29-06-13 16:02, Michael Torrie schreef: The real problem here is that you don't understand how python variables work. And in fact, python does not have variables. It has names that bind to objects. I

Re: Closures in leu of pointers?

2013-06-29 Thread cts . private . yahoo
exactly that. Without wanting to analyze it in too much depth now, I would want a local keyword to allow me to know I was protecting my variables, and a way to specify other scopes, without so much implied scoping in non-intuitive ways... Now everybody is gonna tell me how wrong I am, but you

Re: Unittest fails to import module

2013-06-29 Thread Roy Smith
In article b38pvbfjlv...@mid.individual.net, Martin Schöön martin.sch...@gmail.com wrote: I know the answer to this must be trivial but I am stuck... I am starting on a not too complex Python project. Right now the project file structure contains three subdirectories and two files with

Re: Closures in leu of pointers?

2013-06-29 Thread Steven D'Aprano
On Sat, 29 Jun 2013 12:20:45 -0700, cts.private.yahoo wrote: exactly that. Exactly what? Who are you replying to? Your post has no context. Without wanting to analyze it in too much depth now, I would want a local keyword to allow me to know I was protecting my variables, and a way to

Re: Unittest fails to import module

2013-06-29 Thread Steven D'Aprano
On Sat, 29 Jun 2013 19:13:47 +, Martin Schöön wrote: $PYTHONPATH points at both the code and the test directories. When I run blablabla_test.py it fails to import blablabla.py What error message do you get? I have messed around for oven an hour and get nowhere. I have done

Re: Closures in leu of pointers?

2013-06-29 Thread cts . private . yahoo
Touchy aren't we ... :) -- http://mail.python.org/mailman/listinfo/python-list

Re: Closures in leu of pointers?

2013-06-29 Thread Tim Chase
On 2013-06-29 19:19, Steven D'Aprano wrote: Nobody ever asks why Python doesn't let you sort an int, or take the square of a list... just to be ornery, you can sort an int: i = 314159265 ''.join(sorted(str(i))) '112345569' And I suppose, depending on how you define it, you can square a

Re: Why is the argparse module so inflexible?

2013-06-29 Thread Ethan Furman
On 06/28/2013 10:28 PM, Steven D'Aprano wrote: I'm willing to concede that, just maybe, something like argparse could default to catch exceptions and exit ON rather than OFF. On this we can agree. :) -- ~Ethan~ -- http://mail.python.org/mailman/listinfo/python-list

Re: Closures in leu of pointers?

2013-06-29 Thread Ian Kelly
On Sat, Jun 29, 2013 at 1:33 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 29 Jun 2013 12:20:45 -0700, cts.private.yahoo wrote: Without wanting to analyze it in too much depth now, I would want a local keyword to allow me to know I was protecting my variables, and a

Re: Closures in leu of pointers?

2013-06-29 Thread Joshua Landau
On 29 June 2013 20:42, Tim Chase t...@thechases.com wrote: On 2013-06-29 19:19, Steven D'Aprano wrote: Nobody ever asks why Python doesn't let you sort an int, or take the square of a list... just to be ornery, you can sort an int: i = 314159265 ''.join(sorted(str(i))) '112345569' To be

Re: python adds an extra half space when reading from a string or list

2013-06-29 Thread Joshua Landau
On 29 June 2013 18:00, Mark Lawrence breamore...@yahoo.co.uk wrote: On 29/06/2013 17:05, Joshua Landau wrote: asks for clarification Why this when the approach to Nick the Incompetant Greek has been to roll out the red carpet? I am my own person, and should not be judged by the actions of

Re: Python Zelda II sequel - game engine works - GPLv2

2013-06-29 Thread elvish . healer
The game has a homepage now so you can follow the game there, see http://www.zeldadungeon.net/wiki/The_adventure_of_Link_2 There's also lots of screenshots on that page. TW -- http://mail.python.org/mailman/listinfo/python-list

Re: Closures in leu of pointers?

2013-06-29 Thread Terry Reedy
On 6/29/2013 3:47 PM, Ian Kelly wrote: On Sat, Jun 29, 2013 at 1:33 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 29 Jun 2013 12:20:45 -0700, cts.private.yahoo wrote: Huh? What language are you programming in? Python doesn't have implied scoping in non-intuitive

Re: Unittest fails to import module

2013-06-29 Thread Martin Schöön
On 2013-06-29, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: On Sat, 29 Jun 2013 19:13:47 +, Martin Schöön wrote: $PYTHONPATH points at both the code and the test directories. When I run blablabla_test.py it fails to import blablabla.py What error message do you get?

Re: Closures in leu of pointers?

2013-06-29 Thread Ian Kelly
On Sat, Jun 29, 2013 at 2:53 PM, Terry Reedy tjre...@udel.edu wrote: # The alternative for either program or people is a 1-pass + backtracking process where all understandings are kept provisional until the end of the body and revised as required. 2 passes are simpler. Or simply an explicit

Re: Closures in leu of pointers?

2013-06-29 Thread cts . private . yahoo
No, actually, it's okay that it's local by default, after all. TCL's got that capability of explicitly specifying the scope (up n or something like that?). That's okay for tcl, not sure if it would seem so elegant for python. But you can't tell me that the scenarios that I presented in the

Re: Closures in leu of pointers?

2013-06-29 Thread Michael Torrie
On 06/29/2013 01:19 PM, Steven D'Aprano wrote: Python's basic data types are not necessarily immutable. Lists and dicts are not immutable. Being a high-level language, the idea of primitives like int, double, float, etc from C doesn't really apply. A Python dict is not made up from Python

Re: Closures in leu of pointers?

2013-06-29 Thread Michael Torrie
On 06/29/2013 01:20 PM, cts.private.ya...@gmail.com wrote: exactly that. Without wanting to analyze it in too much depth now, I would want a local keyword to allow me to know I was protecting my variables, and a way to specify other scopes, without so much implied scoping in non-intuitive

Rough sketch of a PEP for issue2292

2013-06-29 Thread Joshua Landau
In order to get the ball rolling, and because after hours of futzing I still can't get the diff to work (yeah, fine, I'm incompetent), I've started sketching out how a PEP for http://bugs.python.org/issue2292, Missing *-unpacking generalizations might look. It's attached if anyone cares to look.

Re: Looking for a name for a deployment framework...

2013-06-29 Thread Chris Angelico
On Wed, Jun 26, 2013 at 9:40 PM, Roy Smith r...@panix.com wrote: For further hack value, require that all pull requests to the project be done entirely in iambic pentameter: for host in hosts: deploy(the_code).remote() For further hack delight, require a patch Submitted for this code

Re: Closures in leu of pointers?

2013-06-29 Thread Steven D'Aprano
On Sat, 29 Jun 2013 14:42:58 -0500, Tim Chase wrote: On 2013-06-29 19:19, Steven D'Aprano wrote: Nobody ever asks why Python doesn't let you sort an int, or take the square of a list... just to be ornery, you can sort an int: i = 314159265 ''.join(sorted(str(i))) '112345569' And I

Re: Closures in leu of pointers?

2013-06-29 Thread Terry Reedy
On 6/29/2013 5:21 PM, Ian Kelly wrote: On Sat, Jun 29, 2013 at 2:53 PM, Terry Reedy tjre...@udel.edu wrote: # The alternative for either program or people is a 1-pass + backtracking process where all understandings are kept provisional until the end of the body and revised as required. 2 passes

Re: Closures in leu of pointers?

2013-06-29 Thread Chris Angelico
On Sun, Jun 30, 2013 at 2:32 PM, Terry Reedy tjre...@udel.edu wrote: On 6/29/2013 5:21 PM, Ian Kelly wrote: On Sat, Jun 29, 2013 at 2:53 PM, Terry Reedy tjre...@udel.edu wrote: # The alternative for either program or people is a 1-pass + backtracking process where all understandings are kept

Re: Closures in leu of pointers?

2013-06-29 Thread Ian Kelly
On Sat, Jun 29, 2013 at 10:32 PM, Terry Reedy tjre...@udel.edu wrote: On 6/29/2013 5:21 PM, Ian Kelly wrote: Or simply an explicit declaration of scope at the beginning of the function definition. One of the reasons I switched to Python was to not have to do that, or hardly ever. For valid

[issue16418] argparse with many choices can generate absurdly long usage message

2013-06-29 Thread paul j3
Changes by paul j3 ajipa...@gmail.com: -- nosy: +paul.j3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16418 ___ ___ Python-bugs-list mailing list

[issue18322] test_stat nits

2013-06-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset f3f38c84aebc by Antoine Pitrou in branch 'default': Issue #18322: fix some test_stat nits. http://hg.python.org/cpython/rev/f3f38c84aebc -- nosy: +python-dev ___ Python tracker rep...@bugs.python.org

[issue18322] test_stat nits

2013-06-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: Committed with unittest.main(). Thanks for the comments. -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org

[issue18266] Fix test discovery for test_largefile.py

2013-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: There is other problem with test_largefile. It not allows running only selected tests. I.e. ./python -m test.regrtest -v -m test_lseek test_largefile Looks as test_largefile was suboptimal converted to unittest. -- nosy: +facundobatista,

[issue18326] Not Clear Docs

2013-06-29 Thread icedream91
New submission from icedream91: I think the documents talking about list.sort() in page http://docs.python.org/3/library/stdtypes.html#list.sort is not clear enough. What asterisk means in sort(*, key=None, reverse=None), may be cmp argument from Python 2, or anything else? Or it is a typo?

[issue18326] Not Clear Docs

2013-06-29 Thread R. David Murray
R. David Murray added the comment: It means they are keyword-only arguments. This could be mentioned in the text, with the term 'keyword-only arguments' linked to an appropriate glossary entry (which appears to need to be added). -- keywords: +easy nosy: +r.david.murray stage: -

[issue18280] Documentation is too personalized

2013-06-29 Thread Antoine Pitrou
Antoine Pitrou added the comment: The sockets tutorial deserves a good overhaul :-) -- nosy: +pitrou ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18280 ___

[issue14455] plistlib unable to read json and binary plist files

2013-06-29 Thread Ronald Oussoren
Ronald Oussoren added the comment: Any review would be greatly appreciated. One thing I'm not too happy about is the use of magic numbers in the binary plist support code, but I think that using constants or a dispatch table would not make the code any clearer. --

[issue18237] unittest.assertRaisesRegex(p) example is wrong in docs

2013-06-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 4a714fea95ef by Terry Jan Reedy in branch '2.7': Issue #18237: Fix assertRaisesRegexp error caought by Jeff Tratner. http://hg.python.org/cpython/rev/4a714fea95ef New changeset b3d19f0494e7 by Terry Jan Reedy in branch '3.3': Issue #18237: Fix

[issue18237] unittest.assertRaisesRegex(p) example is wrong in docs

2013-06-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: I went with adding ' after changing '...' to If you think you might ever submit a more substantial patch, and we hope you do, please submit a Contributor Agreement (now optionally electronic). http://www.python.org/psf/contrib/ When processed (a week?),

[issue18244] singledispatch: When virtual-inheriting ABCs at distinct points in MRO, composed MRO is dependent on haystack ordering

2013-06-29 Thread Łukasz Langa
Łukasz Langa added the comment: Looks like the priority ordering you mention is not yet documented anywhere. It definitely makes sense but I'd like to take a step back for a moment to consider the following questions: 1. What additional functionality do our users get with this ordering? In

[issue18042] Provide enum.unique class decorator

2013-06-29 Thread Ethan Furman
Ethan Furman added the comment: Integrated comments. -- Added file: http://bugs.python.org/file30730/unique.stoneleaf.02.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18042 ___

[issue18327] swapped arguments in compatible_for_assignment()?

2013-06-29 Thread Christian Heimes
New submission from Christian Heimes: Coverity has found something fishy in our code base: CID 983564 (#1 of 1): Arguments in wrong order (SWAPPED_ARGUMENTS)swapped_arguments: The positions of arguments newto and oldto are inconsistent with the positions of the corresponding parameters for

[issue18206] license url in site.py should always use X.Y.Z form of version number

2013-06-29 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +dbrecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18206 ___ ___ Python-bugs-list

[issue17908] Unittest runner needs an option to call gc.collect() after each test

2013-06-29 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +dbrecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17908 ___ ___ Python-bugs-list

[issue18292] IDLE Improvements: Unit test for AutoExpand.py

2013-06-29 Thread Phil Webster
Changes by Phil Webster webster.p...@gmail.com: -- nosy: +philwebster ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18292 ___ ___ Python-bugs-list

[issue17845] Clarify successful build message

2013-06-29 Thread Demian Brecht
Changes by Demian Brecht demianbre...@gmail.com: -- nosy: +dbrecht ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue17845 ___ ___ Python-bugs-list

[issue18328] Use after free in pystate.c

2013-06-29 Thread Christian Heimes
New submission from Christian Heimes: Coverity doesn't like the code in and I think it's right. Can somebody look into the matter and check Python 3.3, too? http://hg.python.org/cpython/file/ac7bc6700ac3/Python/pystate.c#l376 http://hg.python.org/cpython/file/ac7bc6700ac3/Python/pystate.c#l394

[issue14455] plistlib unable to read json and binary plist files

2013-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I have added comments on Rietveld. I have to apologize for unwitting misleading of d9pouces. Functional version of the patch is enough Pythonic and it looks more clear to me than object-oriented one. -- ___

[issue18329] for line in socket.makefile() speed degradation

2013-06-29 Thread Марк Коренберг
New submission from Марк Коренберг: Results or running attached program: $ python2.7 qwe.py TCP mode, makefile method. 198807.2 lines per second (189.6 MB/s). Delay is 5.03 seconds TCP mode, fdopen method. 1041666.7 lines per second (993.4 MB/s). Delay is 0.96 seconds UNIX mode, makefile

[issue18329] for line in socket.makefile() speed degradation

2013-06-29 Thread Марк Коренберг
Марк Коренберг added the comment: Yes, results are repeatable, and for python 2.7 I have roughly same timings for UNIX socket. Also, I have straced all variants and see that in all 4 cases (and for both python versions) IO is done using 8192 blocks in size, so buffering is not cause of

[issue18329] for line in socket.makefile() speed degradation

2013-06-29 Thread Марк Коренберг
Марк Коренберг added the comment: Well, python 3.3 is slightly faster: $ python3.3 qwe.py TCP mode, makefile method. 380228.1 lines per second (362.6 MB/s). Delay is 2.63 seconds TCP mode, fdopen method. 877193.0 lines per second (836.6 MB/s). Delay is 1.14 seconds UNIX mode, makefile

[issue12716] Reorganize os docs for files/dirs/fds

2013-06-29 Thread A.M. Kuchling
A.M. Kuchling added the comment: Closing this issue after a week. Mike Hoy: thanks for your patch. -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12716

[issue4199] add shorthand global and nonlocal statements

2013-06-29 Thread A.M. Kuchling
A.M. Kuchling added the comment: Bumping version to 3.4. I'll send a note to python-dev about this issue. -- versions: +Python 3.4 -Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4199

[issue18329] for line in socket.makefile() speed degradation

2013-06-29 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Try to wrap socket.makefile() with io.BufferedReader(). -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18329 ___

[issue18329] for line in socket.makefile() speed degradation

2013-06-29 Thread Richard Oudkerk
Richard Oudkerk added the comment: I think in Python 3 makefile() returns a TextIOWrapper object by default. To force the use of binary you need to specfiy the mode: fileobj = ss.makefile(mode='rb') -- nosy: +sbt ___ Python tracker

[issue18330] Fix idlelib.PyShell.build_subprocess_arglist use of __import__

2013-06-29 Thread Terry J. Reedy
New submission from Terry J. Reedy: The purpose of the function is to create a command line for the user subprocess. Most of its body: ''' # Maybe IDLE is installed and is being accessed via sys.path, # or maybe it's not installed and the idle.py script is being # run from the IDLE source

[issue18329] for line in socket.makefile() speed degradation

2013-06-29 Thread Марк Коренберг
Changes by Марк Коренберг socketp...@gmail.com: Removed file: http://bugs.python.org/file30731/qwe.py ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18329 ___

[issue18329] for line in socket.makefile() speed degradation

2013-06-29 Thread Марк Коренберг
Марк Коренберг added the comment: Eliminate unicode conversion for python3, but results still the same $ python2.7 qwe.py TCP mode, makefile method. 211416.5 lines per second (201.6 MB/s). Delay is 4.73 seconds TCP mode, fdopen method. 1041666.7 lines per second (993.4 MB/s). Delay is

[issue18329] for line in socket.makefile() speed degradation

2013-06-29 Thread Марк Коренберг
Марк Коренберг added the comment: Can anyone test in python 3.4 ? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18329 ___ ___ Python-bugs-list

[issue18103] Create a GUI test framework for Idle

2013-06-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset c818c215f1a4 by Terry Jan Reedy in branch '3.3': Issue #18103: Update README.txt and test_idle to describe and run gui tests. http://hg.python.org/cpython/rev/c818c215f1a4 -- nosy: +python-dev ___ Python

[issue18103] Create a GUI test framework for Idle

2013-06-29 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0767363a0393 by Terry Jan Reedy in branch '2.7': Issue #18103: Update README.txt and test_idle to describe and run gui tests. http://hg.python.org/cpython/rev/0767363a0393 -- ___ Python tracker

  1   2   >