Re: sum() requires number, not simply __add__

2012-02-24 Thread Peter Otten
Buck Golemon wrote: I feel like the design of sum() is inconsistent with other language features of python. Often python doesn't require a specific type, only that the type implement certain methods. Given a class that implements __add__ why should sum() not be able to operate on that

Re: Please verify!!

2012-02-24 Thread Ben Finney
Andrew Berg bahamutzero8...@gmail.com writes: On 2/23/2012 4:43 PM, Dave Angel wrote: First thing I'd do is to disable tab logic in the editor. When you press the tab key, there's no excuse for an editor to actually put a tab in the file. It should adjust the column by adding the

Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty

2012-02-24 Thread Peter Otten
Ethan Furman wrote: Steven D'Aprano wrote: On Thu, 23 Feb 2012 16:30:09 -0800, Alex Willmer wrote: This week I was slightly surprised by a behaviour that I've not considered before. I've long used for i, x in enumerate(seq): # do stuff as a standard looping-with-index construct. In

subtraction of floating point numbers

2012-02-24 Thread Jaroslav Dobrek
Hello, when I have Python subtract floating point numbers it yields weird results. Example: 4822.40 - 4785.52 = 36.87992 Why doesn't Python simply yield the correct result? It doesn't have a problem with this: 482240 - 478552 = 3688 Can I tell Python in some way to do this

Re: subtraction of floating point numbers

2012-02-24 Thread Alain Ketterlin
Jaroslav Dobrek jaroslav.dob...@gmail.com writes: when I have Python subtract floating point numbers it yields weird results. Example: 4822.40 - 4785.52 = 36.87992 We've had this discussion here one or two days ago... The usual answer is: please read What Every Computer Scientist

Re: asynchronous downloading

2012-02-24 Thread Giampaolo Rodolà
Il 24 febbraio 2012 02:10, Plumo richar...@gmail.com ha scritto: that example is excellent - best use of asynchat I have seen so far. I read through the python-dev archives and found the fundamental problem is no one maintains asnycore / asynchat. Well, actually I do/did. Point with

Re: Please verify!!

2012-02-24 Thread Andrew Berg
On 2/24/2012 2:32 AM, Ben Finney wrote: Are you referring to novice programmers – who, by any reasonable definition of “novice”, don't have an opinion on the tabs-versus-spaces indentation debate? Or are you talking about people who are experienced enough to have an opinion and expect their

Re: subtraction of floating point numbers

2012-02-24 Thread Chris Rebert
On Fri, Feb 24, 2012 at 12:41 AM, Jaroslav Dobrek jaroslav.dob...@gmail.com wrote: Hello, when I have Python subtract floating point numbers it yields weird results. Example: 4822.40 - 4785.52 = 36.87992 Why doesn't Python simply yield the correct result? It doesn't have a problem

Re: storing in list and retrieving.

2012-02-24 Thread Smiley 4321
Thanks. It was very simple with using 'pickle'. Thanks. -- On Thu, Feb 23, 2012 at 4:01 PM, Jean-Michel Pichavant jeanmic...@sequans.com wrote: Smiley 4321 wrote: It requires concepts of 'python persistence' for the code to be designed . Else it simple. Looking for some flow??

Re: Please verify!!

2012-02-24 Thread Jugurtha Hadjar
On 23/02/2012 23:13, Manish Sharma wrote: Hi I am new to python language. On my first day, somebody told me that if any python script file is opened with any editor except python editor, the file is corrupted. Some spacing or indentation is changed and script stops working. I was opening the

Re: Please verify!!

2012-02-24 Thread Duncan Booth
Andrew Berg bahamutzero8...@gmail.com wrote: Yes. However, there are many editors for various platforms that handle the different line endings just fine. In fact, Notepad is the only editor I can think of off the top of my head that has an issue. The original question was about Notepad++

Re: Please verify!!

2012-02-24 Thread Andrew Berg
On 2/24/2012 5:21 AM, Duncan Booth wrote: The original question was about Notepad++ which is nothing at all like Notepad. And I did give the OP an answer about Notepad++ specifically in another message. -- CPython 3.2.2 | Windows NT 6.1.7601.17640 --

Re: sum() requires number, not simply __add__

2012-02-24 Thread Antoon Pardon
On 02/24/2012 12:33 AM, Steven D'Aprano wrote: If your application stops working after you carelessly mess with components your application relies on, the right answer is usually: Don't do that then. Python doesn't try to prevent people from shooting themselves in the foot. Yes it does! A

Re: sum() requires number, not simply __add__

2012-02-24 Thread Duncan Booth
Stefan Behnel stefan...@behnel.de wrote: I know that you just meant this as an example, but it's worth mentioning in this context that it's not exactly efficient to sum up lists this way because there is a lot of copying involved. Each adding of two lists creates a third one and copies all

Re: namespace question

2012-02-24 Thread Jean-Michel Pichavant
xixiliguo wrote: c = [1, 2, 3, 4, 5] class TEST(): c = [5, 2, 3, 4, 5] def add( self ): c[0] = 15 a = TEST() a.add() print( c, a.c, TEST.c ) result : [15, 2, 3, 4, 5] [5, 2, 3, 4, 5] [5, 2, 3, 4, 5] why a.add() do not update c in Class TEST? but update c in main file

Re: Please verify!!

2012-02-24 Thread Steven D'Aprano
On Fri, 24 Feb 2012 03:18:18 -0600, Andrew Berg wrote: On 2/24/2012 2:32 AM, Ben Finney wrote: Are you referring to novice programmers – who, by any reasonable definition of “novice”, don't have an opinion on the tabs-versus-spaces indentation debate? Or are you talking about people who

Does turtledemo in Python 3.2 actually work?

2012-02-24 Thread Steven D'Aprano
Python 3.2 includes turtledemo, a demonstration program for the turtle module. When I run it, I can load the turtle scripts, and the GUI application says Press the start button, but there is no start button. Can anyone else confirm this as a bug?

Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty

2012-02-24 Thread Rick Johnson
On Feb 23, 6:30 pm, Alex Willmer a...@moreati.org.uk wrote: [...] as a standard looping-with-index construct. In Python for loops don't create a scope, so the loop variables are available afterward. I've sometimes used this to print or return a record count e.g. for i, x in enumerate(seq):  

Re: Does turtledemo in Python 3.2 actually work?

2012-02-24 Thread Arnaud Delobelle
On 24 February 2012 12:25, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Python 3.2 includes turtledemo, a demonstration program for the turtle module. When I run it, I can load the turtle scripts, and the GUI application says Press the start button, but there is no start

Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty

2012-02-24 Thread Peter Otten
Rick Johnson wrote: On Feb 23, 6:30 pm, Alex Willmer a...@moreati.org.uk wrote: [...] as a standard looping-with-index construct. In Python for loops don't create a scope, so the loop variables are available afterward. I've sometimes used this to print or return a record count e.g. for i,

Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty

2012-02-24 Thread Peter Otten
Peter Otten wrote: The code in the else suite executes only when the for loop is left via break. Oops, the following statement is nonsense: A non-empty iterable is required but not sufficient. Let me try again: A non-empty iterable is required but not sufficient to *skip* the else-suite

Re: Just curious: why is /usr/bin/python not a symlink?

2012-02-24 Thread Roy Smith
In article ji7fbd$drj$1...@r03.glglgl.gl, Thomas Rachel nutznetz-0c1b6768-bfa9-48d5-a470-7603bd3aa...@spamschutz.glglgl.de wrote: Not only that, [hard and symbolic links] have slightly different semantics. This is true, but only for very large values of slightly. Symlinks, for example,

Re: Please verify!!

2012-02-24 Thread Andrew Berg
On 2/24/2012 6:20 AM, Steven D'Aprano wrote: Opinions need to be informed to be better than useless. By definition newbies don't have the experience to have informed opinions. I thought I had implied that I meant informed opinions, but apparently not. There are many times that we can't afford

Re: sum() requires number, not simply __add__

2012-02-24 Thread Roy Smith
In article mailman.123.1330083762.3037.python-l...@python.org, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Python doesn't try to prevent people from shooting themselves in the foot. Yes it does! A simple example is None as a keyword to prevent assignments to it. Hmmm. Just

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Mark Lawrence
On 24/02/2012 13:37, Rick Johnson wrote: I get sick and tired of doing this!!! if maxlength == UNLIMITED: allow_passage() elif len(string) maxlength: deny_passage() What Python needs is some constant that can be compared to ANY numeric type and that constant will ALWAYS be larger!

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Neil Cerutti
On 2012-02-24, Rick Johnson rantingrickjohn...@gmail.com wrote: I get sick and tired of doing this!!! if maxlength == UNLIMITED: allow_passage() elif len(string) maxlength: deny_passage() What Python needs is some constant that can be compared to ANY numeric type and that

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Miki Tebeka
float('infinity') should be good enough. -- http://mail.python.org/mailman/listinfo/python-list

Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty

2012-02-24 Thread Steven D'Aprano
On Fri, 24 Feb 2012 13:44:15 +0100, Peter Otten wrote: for i in []: ... pass ... else: ... print else ... else for i in [42]: ... pass ... else: ... print else ... else for i in [42]: ... break ... else: ... print else ... The code in the else suite

Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty

2012-02-24 Thread Arnaud Delobelle
On 24 February 2012 14:54, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: for...else is a very useful construct, but the name is misleading. It took me a long time to stop thinking that the else clause executes when the for loop was empty. This is why I think we should call this

Re: A quirk/gotcha of for i, x in enumerate(seq) when seq is empty

2012-02-24 Thread Peter Otten
Steven D'Aprano wrote: The code in the else suite executes only when the for loop is left via break. A non-empty iterable is required but not sufficient. You have a typo there. As your examples show, the code in the else suite executes only when the for loop is NOT left via break (or

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Rick Johnson
On Feb 24, 8:39 am, Miki Tebeka miki.teb...@gmail.com wrote: float('infinity') should be good enough. Yes, that is the answer however the implementation is inconsistent. py float(inf) inf py float(infinity) inf py int(inf) Traceback (most recent call last): File pyshell#2, line 1, in module

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Mel Wilson
Rick Johnson wrote: I get sick and tired of doing this!!! if maxlength == UNLIMITED: allow_passage() elif len(string) maxlength: deny_passage() What Python needs is some constant that can be compared to ANY numeric type and that constant will ALWAYS be larger! Easily fixed:

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Rick Johnson
On Feb 24, 8:25 am, Neil Cerutti ne...@norwich.edu wrote: What Python needs is some constant that can be compared to ANY numeric type and that constant will ALWAYS be larger! What's the point of that? The only time I've naively pined for such a thing is when misapplying C idioms for

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Steven D'Aprano
On Fri, 24 Feb 2012 10:21:45 -0500, Mel Wilson wrote: Rick Johnson wrote: I get sick and tired of doing this!!! if maxlength == UNLIMITED: allow_passage() elif len(string) maxlength: deny_passage() What Python needs is some constant that can be compared to ANY numeric type

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Rick Johnson
On Feb 24, 9:21 am, Mel Wilson mwil...@the-wire.com wrote: Easily fixed: [...snip code...] Yes i could write my own implementation of INFINITY if i wanted, although i would have returned True and False as apposed to 1 and 0 AND used the identifiers Infinity and Infinitesimal, but i digress :-

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Rick Johnson
On Feb 24, 7:55 am, Mark Lawrence breamore...@yahoo.co.uk wrote: Do you want to test for something that is larger than infinity? Not exactly. I want to set a constant that has a value of infinity and then do comparisons against the constant. ## # Hypothetical 1 #

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Michael Torrie
On 02/24/2012 08:34 AM, Rick Johnson wrote: Yes i could write my own implementation of INFINITY if i wanted, although i would have returned True and False as apposed to 1 and 0 AND used the identifiers Infinity and Infinitesimal, but i digress :- P. However, INFINITY is something i believe

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Mark Lawrence
On 24/02/2012 16:23, Michael Torrie wrote: On 02/24/2012 08:34 AM, Rick Johnson wrote: Yes i could write my own implementation of INFINITY if i wanted, although i would have returned True and False as apposed to 1 and 0 AND used the identifiers Infinity and Infinitesimal, but i digress :- P.

Re: multiprocessing, what am I doing wrong?

2012-02-24 Thread Eric Frederich
I can sill get it to freeze and nothing is printed out from the other except block. Does it look like I'm doing anything wrong here? On Thu, Feb 23, 2012 at 3:42 PM, MRAB pyt...@mrabarnett.plus.com wrote: On 23/02/2012 17:59, Eric Frederich wrote: Below is some pretty simple code and the

Re: Just curious: why is /usr/bin/python not a symlink?

2012-02-24 Thread John Roth
On Feb 23, 2:11 pm, Terry Reedy tjre...@udel.edu wrote: On 2/23/2012 2:34 PM, HoneyMonster wrote: On Thu, 23 Feb 2012 14:24:23 -0500, Jerry Hill wrote: On Thu, Feb 23, 2012 at 2:11 PM, HoneyMonster some...@someplace.invalid  wrote: $ cd /usr/bin $ ls -l python* -rwxr-xr-x 2

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Devin Jeanpierre
On Fri, Feb 24, 2012 at 9:25 AM, Neil Cerutti ne...@norwich.edu wrote: The only time I've naively pined for such a thing is when misapplying C idioms for finding a minimum value. Python provides an excellent min implementation to use instead. min can be a little inconvenient. As soon as

Re: multiprocessing, what am I doing wrong?

2012-02-24 Thread MRAB
On 24/02/2012 17:00, Eric Frederich wrote: I can sill get it to freeze and nothing is printed out from the other except block. Does it look like I'm doing anything wrong here? [snip] I don't normally use multiprocessing, so I forgot about a critical detail. :-( When the multiprocessing module

Re: Python LOC, .exe size, and refactoring

2012-02-24 Thread CM
On Feb 22, 12:29 am, Steven D'Aprano steve +comp.lang.pyt...@pearwood.info wrote: On Tue, 21 Feb 2012 19:51:07 -0800, CM wrote: I have an application that I was hoping to reduce a bit the size of its .exe when packaged with py2exe.  I'm removing some Python modules such as Tkinter, etc.,

Re: namespace question

2012-02-24 Thread David
Your code updated to show the difference between a variable, a class variable, and an instance variable. c = [1, 2, 3, 4, 5] class TEST(): c = [5, 2, 3, 4, 5] ## class variable (TEST.c) def __init__(self): self.c = [1, 2, 3, 4, 5] ## instance variable (a.c) def add(self,

Re: Please verify!!

2012-02-24 Thread Chris Angelico
On Fri, Feb 24, 2012 at 11:20 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Personally, I prefer tabs for theoretical reasons and spaces for practical ones. I think that the world would be better off if we all standardised on tabs instead of spaces, but since that's not going

Parameter guidelines for the Strong AI Singularity

2012-02-24 Thread Mentifex
=== Purpose === A parameter in the AI Mind software serves to guide or limit the operation of a mind-module. If a module is conducting a search of AI memory, one parameter may govern how much of memory will be searched, while other parameters may dictate exactly what is to be looked for. Since it

Re: Does turtledemo in Python 3.2 actually work?

2012-02-24 Thread Terry Reedy
On 2/24/2012 7:25 AM, Steven D'Aprano wrote: Python 3.2 includes turtledemo, a demonstration program for the turtle module. When I run it, I can load the turtle scripts, and the GUI application says Press the start button, but there is no start button. Can anyone else confirm this as a bug?

Re: sum() requires number, not simply __add__

2012-02-24 Thread Terry Reedy
On 2/24/2012 8:23 AM, Roy Smith wrote: In articlemailman.123.1330083762.3037.python-l...@python.org, Antoon Pardonantoon.par...@rece.vub.ac.be wrote: Python doesn't try to prevent people from shooting themselves in the foot. Yes it does! A simple example is None as a keyword to prevent

How to handle calling functions from cli

2012-02-24 Thread Rodrick Brown
I have a bunch of sub routines that run independently to perform various system checks on my servers. I wanted to get an opinion on the following code I have about 25 independent checks and I'm adding the ability to disable certain checks that don't apply to certain hosts. m = { 'a':

Re: namespace question

2012-02-24 Thread Steven D'Aprano
On Fri, 24 Feb 2012 10:08:43 -0800, David wrote: Your code updated to show the difference between a variable, a class variable, and an instance variable. The preferred terms in Python circles are class and instance *attributes*, not variables. An integer variable is a variable holding an

Re: How to handle calling functions from cli

2012-02-24 Thread Chris Rebert
On Fri, Feb 24, 2012 at 2:16 PM, Rodrick Brown rodrick.br...@gmail.com wrote: I have a bunch of sub routines that run independently to perform various system checks on my servers. I wanted to get an opinion on the following code I have about 25 independent checks and I'm adding the ability to

Re: How to handle calling functions from cli

2012-02-24 Thread Chris Angelico
On Sat, Feb 25, 2012 at 9:16 AM, Rodrick Brown rodrick.br...@gmail.com wrote: m = { 'a': 'checkDisks()',          'b': 'checkMemSize()',          'c': 'checkBondInterfaces()'    }    runlist = [ c for c in m.keys() if c not in r.d ]    for runable in runlist:        eval(m[runable]) It's

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Steven D'Aprano
On Fri, 24 Feb 2012 09:23:08 -0700, Michael Torrie wrote: All this reminds me of the original cray supercomputers. They didn't use twos compliment for integers so they had two representations of zero (+0 and -0). Made programming a bit tricky. While there is only one integer zero, I would

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Michael Torrie
On 02/24/2012 09:59 AM, Mark Lawrence wrote: The C integer bit doesn't matter since e.g. a=100 a

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Chris Angelico
On Sat, Feb 25, 2012 at 10:16 AM, Michael Torrie torr...@gmail.com wrote: Sure but that doesn't answer the question posed.  How does Rick plan to represent an infinite integer? Obviously you've shown that with an infinite amount of memory we could do it quite easily.  But baring that, how does

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Mark Lawrence
On 24/02/2012 23:16, Michael Torrie wrote: On 02/24/2012 09:59 AM, Mark Lawrence wrote: The C integer bit doesn't matter since e.g. a=100 a

Re: namespace question

2012-02-24 Thread Mark Lawrence
On 24/02/2012 22:25, Steven D'Aprano wrote: On Fri, 24 Feb 2012 10:08:43 -0800, David wrote: Your code updated to show the difference between a variable, a class variable, and an instance variable. The preferred terms in Python circles are class and instance *attributes*, not variables. An

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread MRAB
On 24/02/2012 23:16, Michael Torrie wrote: On 02/24/2012 09:59 AM, Mark Lawrence wrote: The C integer bit doesn't matter since e.g. a=100 a

Re: Please verify!!

2012-02-24 Thread Mark Lawrence
On 24/02/2012 20:41, Chris Angelico wrote: On Fri, Feb 24, 2012 at 11:20 PM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Personally, I prefer tabs for theoretical reasons and spaces for practical ones. I think that the world would be better off if we all standardised on tabs

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Fayaz Yusuf Khan
On Saturday 25 Feb 2012 12:37:58 AM MRAB wrote: We already have arbitrarily long ints, so there could be a special infinite int singleton (actually, 2 of them, one positive, the other negative). Seconded. Although would a wish request to bugs.python.org saying Allow storage of the integer

Re: Please verify!!

2012-02-24 Thread Chris Angelico
On Sat, Feb 25, 2012 at 11:49 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: Oo, thou sinner, fancy violating PEP 8 and standardising on tabs. PEP 8 applies only to Python code, our standard is across all our languages :) But yes, I'm a horrible sinner and I like tabs. They separate the

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Ian Kelly
On Fri, Feb 24, 2012 at 10:32 AM, Devin Jeanpierre jeanpierr...@gmail.com wrote: On Fri, Feb 24, 2012 at 9:25 AM, Neil Cerutti ne...@norwich.edu wrote: The only time I've naively pined for such a thing is when misapplying C idioms for finding a minimum value. Python provides an excellent min

Re: namespace question

2012-02-24 Thread Steven D'Aprano
On Sat, 25 Feb 2012 00:39:39 +, Mark Lawrence wrote: On 24/02/2012 22:25, Steven D'Aprano wrote: On Fri, 24 Feb 2012 10:08:43 -0800, David wrote: Your code updated to show the difference between a variable, a class variable, and an instance variable. The preferred terms in Python

Re: PyWart: Language missing maximum constant of numeric types!

2012-02-24 Thread Steven D'Aprano
On Sat, 25 Feb 2012 06:52:09 +0530, Fayaz Yusuf Khan wrote: On Saturday 25 Feb 2012 12:37:58 AM MRAB wrote: We already have arbitrarily long ints, so there could be a special infinite int singleton (actually, 2 of them, one positive, the other negative). Seconded. Although would a wish

Re: Please verify!!

2012-02-24 Thread Dave Angel
On 02/24/2012 08:25 PM, Chris Angelico wrote: On Sat, Feb 25, 2012 at 11:49 AM, Mark Lawrencebreamore...@yahoo.co.uk wrote: Oo, thou sinner, fancy violating PEP 8 and standardising on tabs. PEP 8 applies only to Python code, our standard is across all our languages :) But yes, I'm a horrible

SSL on 3.2.2

2012-02-24 Thread Jason Friedman
Hello, attempting to build from source on Ubuntu 11.10. Before running ./configure I had set this in Modules/Setup.dist: SSL=/usr/lib/ssl _ssl _ssl.c \ -DUSE_SSL -I$(SSL)/include -I$(SSL)/include/openssl \ -L$(SSL)/lib -lssl -lcrypto $ ll /usr/lib/ssl total 4 lrwxrwxrwx 1 root

[issue812369] module shutdown procedure based on GC

2012-02-24 Thread Armin Rigo
Armin Rigo ar...@users.sourceforge.net added the comment: Obviously we run atexit code too. There is no point in having atexit if it's not guaranteed to run in a normal shutdown. -- ___ Python tracker rep...@bugs.python.org

[issue14099] ZipFile.open() should not reopen the underlying file

2012-02-24 Thread Stepan Kasal
Stepan Kasal ka...@ucw.cz added the comment: Attached please find a second iteration of the fix. This time the signature of ZipExtFile is kept backward compatible, with one new parameter added. -- Added file: http://bugs.python.org/file24624/Proposed-fix-of-issue14099-second.patch

[issue14100] Add a missing info to PEP 393 + link from whatsnew 3.3

2012-02-24 Thread Martin v . Löwis
Martin v. Löwis mar...@v.loewis.de added the comment: I'll look into this shortly. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14100 ___ ___

[issue14102] argparse: add ability to create a man page

2012-02-24 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: I think adding a new formatter for man pages would be generally useful. Assuming someone provides a patch. ;-) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14102

[issue14103] argparse: add ability to create a bash_completion script

2012-02-24 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: Yeah, the same issues have been discussed in Issue 4256. My feeling so far is that if there isn't one true format that argparse can produce and be useful to a wide variety of shells, then it's probably not functionality that belongs

[issue13706] non-ascii fill characters no longer work in formatting

2012-02-24 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: STINNER Victor rep...@bugs.python.org wrote: Your comment is incorrect, it was already failing before my commit ;-) Example at changeset 548a023c8230: Ah, sorry about that. I was lazy and tested against 585d3664da89 (which is a couple

[issue4256] argparse: provide a simple way to get a programmatically useful list of options

2012-02-24 Thread Steven Bethard
Steven Bethard steven.beth...@gmail.com added the comment: So it seems like what bash needs and what zsh needs are pretty different. My feeling so far is that if there isn't one true format that argparse can produce and be useful to a wide variety of shells, then it's probably not

[issue13909] Ordering of free variables in dis is dependent on dict ordering.

2012-02-24 Thread Mark Shannon
Mark Shannon m...@hotpy.org added the comment: Fixed by revisions 224ebf9d428a and 38828f0c9312 -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13909

[issue13909] Ordering of free variables in dis is dependent on dict ordering.

2012-02-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: test needed - committed/rejected ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue13909 ___

[issue14081] Allow maxsplit argument to str.split() to be passed as a keyword argument

2012-02-24 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: New patch that changes .rsplit() too and updates docs and docstrings. -- Added file: http://bugs.python.org/file24625/issue14081-2.diff ___ Python tracker rep...@bugs.python.org

[issue13973] urllib.parse is imported twice in xmlrpc.client

2012-02-24 Thread Roundup Robot
Roundup Robot devn...@psf.upfronthosting.co.za added the comment: New changeset a3e8f8d10dce by Ezio Melotti in branch 'default': #13973: move a couple of imports at module level. Patch by Tshepang Lekhonkhobe. http://hg.python.org/cpython/rev/a3e8f8d10dce -- nosy: +python-dev

[issue13973] urllib.parse is imported twice in xmlrpc.client

2012-02-24 Thread Ezio Melotti
Ezio Melotti ezio.melo...@gmail.com added the comment: Fixed, thanks for the report and the patch. -- assignee: - ezio.melotti nosy: +ezio.melotti resolution: - fixed stage: - committed/rejected type: - enhancement ___ Python tracker

[issue8077] cgi handling of POSTed files is broken

2012-02-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - test needed versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue8077 ___

[issue1112955] move_file()'s return value when dry_run=1 unclear

2012-02-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +eric.araujo versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1112955 ___

[issue10131] deepcopying an xml.dom.minidom.Document generates an invalid XML document

2012-02-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +eli.bendersky stage: needs patch - test needed versions: +Python 3.3 -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue10131

[issue9262] IDLE: Use tabbed shell and edit windows

2012-02-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- keywords: +patch stage: needs patch - patch review versions: +Python 3.3 -Python 3.2 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9262 ___

[issue12817] test_multiprocessing: io.BytesIO() requires bytearray buffers

2012-02-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: -Python 3.1 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue12817 ___ ___

[issue1531415] parsetok.c emits warnings by writing to stderr

2012-02-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1531415 ___ ___

[issue1116520] Prefix search is filesystem-centric

2012-02-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- versions: +Python 3.3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue1116520 ___ ___

[issue9056] Adding additional level of bookmarks and section numbers in python pdf documents.

2012-02-24 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- stage: - needs patch type: - enhancement ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue9056 ___

[issue12817] test_multiprocessing: io.BytesIO() requires bytearray buffers

2012-02-24 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: The current interpretation in the PEP-3118 repo is that a request without PyBUF_FORMAT means implicit cast to unsigned bytes. This makes the behavior of PyObject_AsWriteBuffer() correct, so I'm closing this. -- resolution: -

[issue14061] Clean up archiving code in shutil

2012-02-24 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: I don't think there's any harm in testing that the exception message for a .bz2 file contains the string unknown archive format. It's unlikely that we'll want to completely change the error message in future, and if we do, it will be pretty

[issue6085] Logging in BaseHTTPServer.BaseHTTPRequestHandler causes lag

2012-02-24 Thread wmg
Changes by wmg wmg...@gmail.com: -- nosy: +wmgaca ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6085 ___ ___ Python-bugs-list mailing list

[issue14087] multiprocessing.Condition.wait_for missing

2012-02-24 Thread sbt
sbt shibt...@gmail.com added the comment: Shouldn't the `for` loop be outside the outer `with` block? Yes. In Lib/multiprocessing/managers.py: Is there a good reason why the wait_for() proxy method can't simply be implemented as: return self._callmethod('wait_for', (predicate, timeout))?

[issue6884] Impossible to include file in sdist that starts with 'build' on Win32

2012-02-24 Thread Nadeem Vawda
Nadeem Vawda nadeem.va...@gmail.com added the comment: There were bugs in two of the updated tests: - test_glob_to_re() was doing two levels of escaping (r'\' - r'') for its expected output when it should only do one (r'\' - r'\\'). - test_process_template() was not converting some of

[issue14106] Distutils manifest: recursive-(include|exclude) matches suffix instead of full filename

2012-02-24 Thread Nadeem Vawda
New submission from Nadeem Vawda nadeem.va...@gmail.com: As I understand it, a MANIFEST.in directive: recursive-include foo bar.* is meant to match files under foo for with names beginning with bar.. However, the actual regex that is generated for this line is:

[issue14106] Distutils manifest: recursive-(include|exclude) matches suffix instead of full filename

2012-02-24 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- dependencies: +Impossible to include file in sdist that starts with 'build' on Win32 stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14106

[issue5438] test_bigmem.test_from_2G_generator uses more memory than expected

2012-02-24 Thread Nadeem Vawda
Changes by Nadeem Vawda nadeem.va...@gmail.com: -- nosy: +nadeem.vawda ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5438 ___ ___ Python-bugs-list

[issue10181] Problems with Py_buffer management in memoryobject.c (and elsewhere?)

2012-02-24 Thread Stefan Krah
Stefan Krah stefan-use...@bytereef.org added the comment: Thanks, Nick. I'll try to get it done this weekend. I've uploaded Misc/NEWS and Doc/whatsnew/3.3.rst (my apologies to Antoine for plagiarizing the first sentence, I found it hard to come up with a better version). I wasn't sure

[issue14107] Debian bigmem buildbot hanging in test_bigmem

2012-02-24 Thread Nadeem Vawda
New submission from Nadeem Vawda nadeem.va...@gmail.com: On the debian bigmem buildbot, test_bigmem hangs until it gets killed by a timeout: http://www.python.org/dev/buildbot/all/builders/AMD64%20debian%20bigmem%203.x/builds/134/steps/test/logs/stdio

[issue14089] Patch to increase fractions lib test coverage

2012-02-24 Thread Oleg Plakhotnyuk
Changes by Oleg Plakhotnyuk oleg...@gmail.com: Removed file: http://bugs.python.org/file24605/test_fractions.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14089 ___

[issue14089] Patch to increase fractions lib test coverage

2012-02-24 Thread Oleg Plakhotnyuk
Changes by Oleg Plakhotnyuk oleg...@gmail.com: Added file: http://bugs.python.org/file24630/test_fractions.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14089 ___

[issue14095] type_new() removes __qualname__ from the input dictionary

2012-02-24 Thread Meador Inge
Meador Inge mead...@gmail.com added the comment: The change in error handling makes this a bit harder to review, but it otherwise looks OK if this is the intended behavior. I am not sure that it is. The original version: 1. If __qualname__ was present in the original dictionary,

[issue14081] Allow maxsplit argument to str.split() to be passed as a keyword argument

2012-02-24 Thread Tshepang Lekhonkhobe
Changes by Tshepang Lekhonkhobe tshep...@gmail.com: -- nosy: +tshepang ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14081 ___ ___

  1   2   >