[issue24066] send_message should take all the addresses in the To: header into account

2015-05-02 Thread Kirill Elagin
Kirill Elagin added the comment: Ah, I’m so dumb. Of course the tests work as there are multiple addresses but still just one field. Here is the test for multiple fields. -- Added file: http://bugs.python.org/file39263/multiple_fields_test.patch

Re: Python is not bad ;-)

2015-05-02 Thread Marko Rauhamaa
Cecil Westerhof ce...@decebal.nl: I find factorial a lot cleaner code as factorial_iterative, so here tail recursion would be beneficial. I would just call math.factorial() and be done with it. Note: Scheme is my favorite language and I use tail recursion all the time. I also think eliminating

[issue24105] Use after free during json encoding a dict (3)

2015-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Proposed patch fixes three related issues: issue24094, issue24095 and issue24105. -- assignee: - serhiy.storchaka keywords: +patch stage: - patch review versions: +Python 3.5 Added file:

Re: GAE environment differences

2015-05-02 Thread Kev Dwyer
Robin Becker wrote: On 01/05/2015 13:15, Chris Angelico wrote: On Fri, May 1, 2015 at 8:29 PM, Robin Becker ro...@reportlab.com wrote: Best thing to do is to ask the user to post the complete traceback. You might need to use import os.path but normally I would expect that not to be an

Re: Python is not bad ;-)

2015-05-02 Thread Dave Angel
On 05/02/2015 05:58 AM, Marko Rauhamaa wrote: Chris Angelico ros...@gmail.com: Guido is against anything that disrupts tracebacks, and optimizing tail recursion while maintaining traceback integrity is rather harder. Tail recursion could be suppressed during debugging. Optimized code can

[issue24112] %b does not work, as a binary output formatter

2015-05-02 Thread Bob Stein
New submission from Bob Stein: `%b%42` produces a ValueError exception instead of outputting '101010' Details here: http://stackoverflow.com/a/29997703/673991 -- messages: 242388 nosy: BobStein priority: normal severity: normal status: open title: %b does not work, as a binary output

Re: Fast way of extracting files from various folders

2015-05-02 Thread subhabrata . banerji
On Saturday, May 2, 2015 at 2:52:32 PM UTC+5:30, Peter Otten wrote: wrote: I have several millions of documents in several folders and subfolders in my machine. I tried to write a script as follows, to extract all the .doc files and to convert them in text, but it seems it is taking too

Problem in Handling MySql Data.

2015-05-02 Thread subhabrata . banerji
Dear Group, I am trying to write the following script to call around 0.3 million files from a remote server. It is generally working fine, but could work only upto 65 to 70 files. After this, it is just printing the file names and not processing anything. If anyone may kindly suggest what I

[issue24112] %b does not work, as a binary output formatter

2015-05-02 Thread Bob Stein
Bob Stein added the comment: Ah, you're right, my mistake. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24112 ___ ___ Python-bugs-list mailing

[issue24111] Valgrind suppression file should be updated

2015-05-02 Thread Antony Lee
New submission from Antony Lee: Since PEP445, the suppressions should target _PyObject_{Free,Realloc} instead of PyObject_{Free,Realloc}. -- messages: 242382 nosy: Antony.Lee priority: normal severity: normal status: open title: Valgrind suppression file should be updated versions:

Re: Python is not bad ;-)

2015-05-02 Thread Gregory Ewing
Steven D'Aprano wrote: People coming from functional languages like Lisp and Haskell often say that, but how many recursive algorithms naturally take a tail-call form? Not that many. And the ones that do tend to be the ones that are better expressed iteratively in Python. So Python doesn't

[issue24105] Use after free during json encoding a dict (3)

2015-05-02 Thread paul
paul added the comment: @Serhiy: Not all of my bugs are in the same module. Sure, I will group them by module in the future. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24105 ___

Re: Fast way of extracting files from various folders

2015-05-02 Thread subhabrata . banerji
On Friday, May 1, 2015 at 5:58:50 PM UTC+5:30, subhabrat...@gmail.com wrote: Dear Group, I have several millions of documents in several folders and subfolders in my machine. I tried to write a script as follows, to extract all the .doc files and to convert them in text, but it seems it

Re: Python is not bad ;-)

2015-05-02 Thread Chris Angelico
On Sat, May 2, 2015 at 8:22 PM, Dave Angel da...@davea.name wrote: On 05/02/2015 05:58 AM, Marko Rauhamaa wrote: Chris Angelico ros...@gmail.com: Guido is against anything that disrupts tracebacks, and optimizing tail recursion while maintaining traceback integrity is rather harder. Tail

Re: Python is not bad ;-)

2015-05-02 Thread Dave Angel
On 05/02/2015 05:33 AM, Cecil Westerhof wrote: Please check your email settings. Your messages that you type seem to be indented properly, but those that are quoting earlier messages (even your own) are not. See below. I suspect there's some problem with how your email program processes

[issue24112] %b does not work, as a binary output formatter

2015-05-02 Thread Steven D'Aprano
Steven D'Aprano added the comment: This is not a bug, since %b is not supported in Python 2, only in Python 3: https://docs.python.org/2/library/stdtypes.html#string-formatting-operations No new features will be added to 2.7, so if you need %b you can use Python 3, or in Python 2.7 you can

Re: Python is not bad ;-)

2015-05-02 Thread Cecil Westerhof
Op Saturday 2 May 2015 11:10 CEST schreef Marko Rauhamaa: Cecil Westerhof ce...@decebal.nl: I find factorial a lot cleaner code as factorial_iterative, so here tail recursion would be beneficial. I would just call math.factorial() and be done with it. You missed the point. I did not need a

Re: Python is not bad ;-)

2015-05-02 Thread Chris Angelico
On Sat, May 2, 2015 at 9:07 PM, Christian Gollwitzer aurio...@gmx.de wrote: I need to add, I grew up with imperative programming, and as such got recursion as the solution to problems that are too complex for iteration, i.e. tree traversal and such, and exactly these are never tail-recursive.

Re: Python is not bad ;-)

2015-05-02 Thread Cecil Westerhof
Op Friday 1 May 2015 09:03 CEST schreef Steven D'Aprano: On Thu, 30 Apr 2015 09:30 pm, Cecil Westerhof wrote: Tail recursion would nice to have also. People coming from functional languages like Lisp and Haskell often say that, but how many recursive algorithms naturally take a tail-call

Re: Python is not bad ;-)

2015-05-02 Thread Marko Rauhamaa
Chris Angelico ros...@gmail.com: Guido is against anything that disrupts tracebacks, and optimizing tail recursion while maintaining traceback integrity is rather harder. Tail recursion could be suppressed during debugging. Optimized code can play all kinds of non-obvious tricks with the

Re: Problem in Handling MySql Data.

2015-05-02 Thread Chris Angelico
On Sat, May 2, 2015 at 8:42 PM, subhabrata.bane...@gmail.com wrote: Dear Group, I am trying to write the following script to call around 0.3 million files from a remote server. It is generally working fine, but could work only upto 65 to 70 files. After this, it is just printing the file

ANN Nanpy 0.9.4

2015-05-02 Thread Andrea Stagi
Hi, I'm happy to announce Nanpy 0.9.4 release. https://pypi.python.org/pypi/nanpy/0.9.4 This release includes some bug fixing and rtscts parameter support for SerialManager, if you're experiencing some problems with Nanpy on Raspberry Pi please set it to True (here an example:

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread Petr Viktorin
Petr Viktorin added the comment: Not true (on 3.3 2.7). import sys import x Traceback (most recent call last): File stdin, line 1, in module File /tmp/x.py, line 1, in module import y File /tmp/y.py, line 1, in module 1/0 ZeroDivisionError: division by zero sys.modules['x']

Re: Python is not bad ;-)

2015-05-02 Thread Chris Angelico
On Sat, May 2, 2015 at 7:10 PM, Marko Rauhamaa ma...@pacujo.net wrote: Note: Scheme is my favorite language and I use tail recursion all the time. I also think eliminating tail recursion is such a low-hanging fruit that even CPython should just pick it. However, I wouldn't use the fibonacci

Re: convert pdf to excel xls file

2015-05-02 Thread jaronstreak
This is a very common problem when we need to convert excel files to pdf format. I have faced this problem many time. Because of my job nature i always need to convert many excel sheets because i could not send them to clients directly. It always took a long time to convert them manually. Then

Re: Python is not bad ;-)

2015-05-02 Thread Cecil Westerhof
Op Saturday 2 May 2015 10:26 CEST schreef Cecil Westerhof: Op Friday 1 May 2015 09:03 CEST schreef Steven D'Aprano: On Thu, 30 Apr 2015 09:30 pm, Cecil Westerhof wrote: Tail recursion would nice to have also. People coming from functional languages like Lisp and Haskell often say that,

Re: Python is not bad ;-)

2015-05-02 Thread Christian Gollwitzer
Am 02.05.15 um 11:58 schrieb Marko Rauhamaa: Chris Angelico ros...@gmail.com: Guido is against anything that disrupts tracebacks, and optimizing tail recursion while maintaining traceback integrity is rather harder. Tail recursion could be suppressed during debugging. Optimized code can play

Re: Python is not bad ;-)

2015-05-02 Thread Marko Rauhamaa
Christian Gollwitzer aurio...@gmx.de: That's why I still think it is a microoptimization, which helps only in some specific cases. It isn't done for performance. It's done to avoid a stack overflow exception. Marko -- https://mail.python.org/mailman/listinfo/python-list

[issue24102] Multiple type confusions in unicode error handlers

2015-05-02 Thread Walter Dörwald
Walter Dörwald added the comment: The patch does indeed fix the segmentation fault. However the exception message looks confusing: TypeError: don't know how to handle UnicodeEncodeError in error callback -- ___ Python tracker

[issue24066] send_message should take all the addresses in the To: header into account

2015-05-02 Thread R. David Murray
R. David Murray added the comment: Ah, but that is intentional. Those fields can only appear once per message, per the RFC. The new email API will raise an error if you attempt to add them more than once. Perhaps we should raise an error instead of ignoring the duplicates, given that we

[issue24102] Multiple type confusions in unicode error handlers

2015-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Py_TYPE() is necessary when the argument is not of type PyObject* (e.g. PyUnicodeObject*). -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24102 ___

Throw the cat among the pigeons

2015-05-02 Thread Cecil Westerhof
I am throwing the cat among the pigeons. ;-) In another thread I mentioned that I liked to have tail recursion in Python. To be clear not automatic, but asked for. Looking at the replies I did hit a nerve. But I still want to continue. Some things are better expressed recursively for the people

[issue24109] Documentation for difflib uses optparse

2015-05-02 Thread Keith Gray
Keith Gray added the comment: I took a look at Tools/scripts/diff.py and it looks like it got converted to use argparse 9 months ago. I think I should be able to just include that in the difflib documentation directly. My next question is which branches need to have this changed? Do I just

Re: l = range(int(1E9))

2015-05-02 Thread BartC
On 30/04/2015 18:20, Ben Finney wrote: Jon Ribbens jon+use...@unequivocal.co.uk writes: If you use xrange() instead of range() then you will get an iterator which will return each of the numbers in turn without any need to create an enormous list of all of them. If you use Python 3 instead

[issue24109] Documentation for difflib uses optparse

2015-05-02 Thread Keith Gray
Keith Gray added the comment: Here is the patch. I have tested it against tip. Let me know if you need anything else. -- keywords: +patch Added file: http://bugs.python.org/file39268/issue-24109.patch ___ Python tracker rep...@bugs.python.org

Re: Custom alphabetical sort

2015-05-02 Thread Pander Musubi
On Monday, 24 December 2012 16:32:56 UTC+1, Pander Musubi wrote: Hi all, I would like to sort according to this order: (' ', '.', '\'', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'A', 'ä', 'Ä', 'á', 'Á', 'â', 'Â', 'à', 'À', 'å', 'Å', 'b', 'B', 'c', 'C', 'ç', 'Ç', 'd',

[issue24110] zipfile.ZipFile.write() does not accept bytes arcname

2015-05-02 Thread R. David Murray
R. David Murray added the comment: Ah, I *thought* there was an issue for that, but I didn't find it when I searched. So this is just a doc issue to fix the docs to reflect current reality. -- ___ Python tracker rep...@bugs.python.org

[issue24102] Multiple type confusions in unicode error handlers

2015-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is a patch that makes error message consistent with type checking. -- Added file: http://bugs.python.org/file39266/codecs_error_handlers_issubclass_2.patch ___ Python tracker rep...@bugs.python.org

Re: convert pdf to excel xls file

2015-05-02 Thread Grant Edwards
On 2015-05-02, David H. Lipman DLipman~NoSpam~@Verizon.Net wrote: From: jaronstr...@gmail.com This is a very common problem That problem is called spam coupled with Google who facilitating it. The problem is called seeing responses to spam that had bee properly filtered out. -- Grant

[issue24102] Multiple type confusions in unicode error handlers

2015-05-02 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- keywords: +patch Added file: http://bugs.python.org/file39265/codecs_error_handlers_issubclass.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24102

[issue24102] Multiple type confusions in unicode error handlers

2015-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Here is simpler reproducer: import codecs class X(str): __class__ = UnicodeEncodeError codecs.ignore_errors(X()) The problem is that PyObject_IsInstance() is fooled by custom __class__, but then builtin error handlers handle error object as having

Re: convert pdf to excel xls file

2015-05-02 Thread David H. Lipman
From: jaronstr...@gmail.com This is a very common problem That problem is called spam coupled with Google who facilitating it. -- Dave Multi-AV Scanning Tool - http://multi-av.thespykiller.co.uk http://www.pctipp.ch/downloads/dl/35905.asp --

[issue24102] Multiple type confusions in unicode error handlers

2015-05-02 Thread Walter Dörwald
Walter Dörwald added the comment: Looks much better. However shouldn't: exc-ob_type-tp_name be: Py_TYPE(exc)-tp_name (although there are still many spots in the source that still use ob_type-tp_name) -- ___ Python tracker

Re: Python is not bad ;-)

2015-05-02 Thread Ian Kelly
On Sat, May 2, 2015 at 4:35 AM, Dave Angel da...@davea.name wrote: I can't see how that is worth doing. The recursive version is already a distortion of the definition of factorial that I learned. And to force it to be recursive and also contort it so it does the operations in the same order

Re: Python is not bad ;-)

2015-05-02 Thread Ian Kelly
On Sat, May 2, 2015 at 5:42 AM, Marko Rauhamaa ma...@pacujo.net wrote: Christian Gollwitzer aurio...@gmx.de: That's why I still think it is a microoptimization, which helps only in some specific cases. It isn't done for performance. It's done to avoid a stack overflow exception. If your

[issue24113] shlex constructor unreachable code

2015-05-02 Thread Michael Smith
New submission from Michael Smith: In its __init__ method, shlex.shlex sets self.debug = 0. An `if self.debug:` statement follows shortly thereafter and without allowing the user to change self.debug. The code inside the if statement is unreachable. Users should either be permitted to set

[issue24113] shlex constructor unreachable code

2015-05-02 Thread Michael Smith
Michael Smith added the comment: Hat tip abarnert on StackOverflow for digging in. http://stackoverflow.com/questions/29996208/putting-shlex-in-debug-mode This code was introduced in https://hg.python.org/cpython/rev/81a121d21340 -- ___ Python

Re: l = range(int(1E9))

2015-05-02 Thread Mark Lawrence
On 02/05/2015 16:26, BartC wrote: On 30/04/2015 18:20, Ben Finney wrote: Jon Ribbens jon+use...@unequivocal.co.uk writes: If you use xrange() instead of range() then you will get an iterator which will return each of the numbers in turn without any need to create an enormous list of all of

Re: l = range(int(1E9))

2015-05-02 Thread BartC
On 02/05/2015 16:40, Mark Lawrence wrote: On 02/05/2015 16:26, BartC wrote: On 30/04/2015 18:20, Ben Finney wrote: Jon Ribbens jon+use...@unequivocal.co.uk writes: If you use xrange() instead of range() then you will get an iterator which will return each of the numbers in turn without any

Re: Python is not bad ;-)

2015-05-02 Thread Cecil Westerhof
Op Saturday 2 May 2015 12:35 CEST schreef Dave Angel: On 05/02/2015 05:33 AM, Cecil Westerhof wrote: Please check your email settings. Your messages that you type seem to be indented properly, but those that are quoting earlier messages (even your own) are not. See below. I suspect there's

Re: Python is not bad ;-)

2015-05-02 Thread Christian Gollwitzer
Am 02.05.15 um 13:21 schrieb Chris Angelico: On Sat, May 2, 2015 at 9:07 PM, Christian Gollwitzer aurio...@gmx.de wrote: I need to add, I grew up with imperative programming, and as such got recursion as the solution to problems that are too complex for iteration, i.e. tree traversal and such,

[issue24066] send_message should take all the addresses in the To: header into account

2015-05-02 Thread Kirill Elagin
Kirill Elagin added the comment: Oh, I see now. It is a good idea to raise an error either in `send_message` or at the moment when a second `To`/`Cc`/`Bcc` header is added to the message. -- resolution: - not a bug status: open - closed ___ Python

[issue24114] ctypes.utils uninitialized variable 'path'

2015-05-02 Thread Kees Bos
New submission from Kees Bos: In certain corner cases, the ctypes.util can raise an error for a uninitialized variable 'path' when with sunos5 the clre program exists, but fails to return valid output lines. (Also in 2.7.10rc0) -- components: ctypes files: ctypes.util-path.patch

[issue24056] Expose closure generator status in function repr()

2015-05-02 Thread Nick Coghlan
Nick Coghlan added the comment: The main reason I suggest using the postfix parenthetical syntax is to make it clear that we're exposing behavioural feature flags for a single underlying type. A prefix syntax would make them look like distinct types, which would be misleading in a different way.

Re: Python is not bad ;-)

2015-05-02 Thread Chris Angelico
On Sun, May 3, 2015 at 1:45 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Sat, May 2, 2015 at 5:42 AM, Marko Rauhamaa ma...@pacujo.net wrote: Christian Gollwitzer aurio...@gmx.de: That's why I still think it is a microoptimization, which helps only in some specific cases. It isn't done for

Re: l = range(int(1E9))

2015-05-02 Thread Mark Lawrence
On 02/05/2015 17:17, BartC wrote: On 02/05/2015 16:40, Mark Lawrence wrote: On 02/05/2015 16:26, BartC wrote: On 30/04/2015 18:20, Ben Finney wrote: Jon Ribbens jon+use...@unequivocal.co.uk writes: If you use xrange() instead of range() then you will get an iterator which will return each

[issue24109] Documentation for difflib uses optparse

2015-05-02 Thread R. David Murray
R. David Murray added the comment: Since the Tools script was only changed in 3.5 (I was looking at the wrong branch), I think the docs should only be changed for 3.5. -- stage: - commit review versions: -Python 2.7, Python 3.2, Python 3.3, Python 3.4, Python 3.5

Re: Python is not bad ;-)

2015-05-02 Thread Joonas Liik
I agree, stack overflow is literally the main issue that ive run in to (tree traversal) I've yet to refactor recursion to iterative for speed, but i have done so to avoid hitting the stack size limit. Tree traversal and similar problems in particular lend themselves well to recursion and are not

Try Except Specific Error Messages

2015-05-02 Thread brandon wallace
Hi,   I am try to get more specific error messages using try/except. I ran this code with the cable unplugged to see the error message. I got #!/usr/bin/env python3 import urllib.request webpage = urllib.request.urlopen(http://fakewebsite.com/;) text = webpage.read().decode(utf8) I got two

Re: Python is not bad ;-)

2015-05-02 Thread Ian Kelly
On Sat, May 2, 2015 at 9:53 AM, Joonas Liik liik.joo...@gmail.com wrote: Top-posting is heavily frowned at on this list, so please don't do it. Balancing of trees is kind of irrelevant when tree means search space no? I think it's relatively rare that DFS is truly the best algorithm for such

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread Eric Snow
Eric Snow added the comment: Either the docs are out-of-date or they are really poorly worded. Most likely it's the former, but I'm taking a look. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24081

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- stage: - commit review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24081 ___ ___

Re: Custom alphabetical sort

2015-05-02 Thread Joel Goldstick
On Sat, May 2, 2015 at 3:25 PM, Dave Angel da...@davea.name wrote: On 05/02/2015 11:35 AM, Pander Musubi wrote: On Monday, 24 December 2012 16:32:56 UTC+1, Pander Musubi wrote: Hi all, I would like to sort according to this order: (' ', '.', '\'', '-', '0', '1', '2', '3', '4', '5', '6',

Re: l = range(int(1E9))

2015-05-02 Thread Marko Rauhamaa
Mark Lawrence breamore...@yahoo.co.uk: On 02/05/2015 19:34, BartC wrote: [...] [...] [...] [...] [...] [...] [...] [...] [...] [...] [...] [...] [...] [...] [etc etc etc] I give up. Mark, you do a commendable job admonishing the forum participants against top-posting. Let me

[issue24109] Documentation for difflib uses optparse

2015-05-02 Thread R. David Murray
Changes by R. David Murray rdmur...@bitdance.com: -- versions: +Python 3.5 -Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24109 ___ ___

Re: Python is not bad ;-)

2015-05-02 Thread Joonas Liik
Balancing of trees is kind of irrelevant when tree means search space no? And you definitely dont need to keep the entire tree in memory at the same time. By cropping unsuitable branches early (and not keeping the entire tree in memory) it is quite easy to have more than 1000 of call stack and

[issue24115] PyObject_IsInstance() and PyObject_IsSubclass() can fail

2015-05-02 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: PyObject_IsInstance() and PyObject_IsSubclass() cat return 0, 1, or -1. But some code use if (PyObject_IsInstance(...)) or if (!PyObject_IsInstance(...)). This should be fixed. -- assignee: serhiy.storchaka components: Extension Modules,

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread R. David Murray
R. David Murray added the comment: OK, I can't reproduce it either, neither in python3 nor python2. Brett, is this left over from a long time ago? Heh. I just tried another experiment and got an interesting result: rdmurray@pydev:~/python/p34cat temp1.py import temp2 foo = 1

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread R. David Murray
R. David Murray added the comment: Note that calling reload on temp1.temp2 will fail with an error that temp2 is not in sys.modules. So maybe the caveat needs rewording rather than deletion. -- ___ Python tracker rep...@bugs.python.org

[issue23088] Document that PyUnicode_AsUTF8() returns a null-terminated string

2015-05-02 Thread R. David Murray
R. David Murray added the comment: Added some review comments. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23088 ___ ___ Python-bugs-list

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread Eric Snow
Eric Snow added the comment: I'm pretty sure this is the culprit: changeset: 32882:331e60d8ce6da19b168849418776fea0940787ec branch: legacy-trunk user:Tim Peters tim.pet...@gmail.com date:Mon Aug 02 03:52:12 2004 + summary: PyImport_ExecCodeModuleEx(): remove

Re: l = range(int(1E9))

2015-05-02 Thread BartC
On 02/05/2015 17:39, Mark Lawrence wrote: On 02/05/2015 17:17, BartC wrote: On 02/05/2015 16:40, Mark Lawrence wrote: for item in items: When did this change, or has it always been this way and you were simply using an idiom from other languages? Your example is the equivalent of

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread R. David Murray
R. David Murray added the comment: Thanks, Petr. (And Eric.) -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24081

Re: l = range(int(1E9))

2015-05-02 Thread Mark Lawrence
On 02/05/2015 19:34, BartC wrote: On 02/05/2015 17:39, Mark Lawrence wrote: On 02/05/2015 17:17, BartC wrote: On 02/05/2015 16:40, Mark Lawrence wrote: for item in items: When did this change, or has it always been this way and you were simply using an idiom from other languages? Your

Re: Try Except Specific Error Messages

2015-05-02 Thread Gary Herron
On 04/30/2015 04:27 PM, brandon wallace wrote: Hi, I am try to get more specific error messages using try/except. I ran this code with the cable unplugged to see the error message. I got #!/usr/bin/env python3 import urllib.request webpage =

[issue24108] fnmatch.translate('*.txt') fails

2015-05-02 Thread R. David Murray
R. David Murray added the comment: Thanks Christophe and Merlijn. -- nosy: +r.david.murray resolution: - fixed stage: - resolved status: open - closed versions: +Python 2.7, Python 3.5 ___ Python tracker rep...@bugs.python.org

Re: Python is not bad ;-)

2015-05-02 Thread Ian Kelly
On Sat, May 2, 2015 at 9:55 AM, Chris Angelico ros...@gmail.com wrote: On Sun, May 3, 2015 at 1:45 AM, Ian Kelly ian.g.ke...@gmail.com wrote: On Sat, May 2, 2015 at 5:42 AM, Marko Rauhamaa ma...@pacujo.net wrote: Christian Gollwitzer aurio...@gmx.de: That's why I still think it is a

[issue24101] Use after free in siftup

2015-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset d356e68de236 by Raymond Hettinger in branch '2.7': Issues #24099, #24100, and #24101: Fix free-after-use bug in heapq. https://hg.python.org/cpython/rev/d356e68de236 -- ___ Python tracker

[issue24100] Use after free in siftdown (2)

2015-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset d356e68de236 by Raymond Hettinger in branch '2.7': Issues #24099, #24100, and #24101: Fix free-after-use bug in heapq. https://hg.python.org/cpython/rev/d356e68de236 -- ___ Python tracker

[issue24099] Use after free in siftdown (1)

2015-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset d356e68de236 by Raymond Hettinger in branch '2.7': Issues #24099, #24100, and #24101: Fix free-after-use bug in heapq. https://hg.python.org/cpython/rev/d356e68de236 -- ___ Python tracker

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 3cdeafd18e61 by R David Murray in branch '3.4': #24081: Remove obsolete caveat from import docs. https://hg.python.org/cpython/rev/3cdeafd18e61 New changeset d57e0c6d292d by R David Murray in branch 'default': Merge: #24081: Remove obsolete caveat

[issue24108] fnmatch.translate('*.txt') fails

2015-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset c5c65ef84a77 by R David Murray in branch '3.4': #24108: Update fnmatch.translate example to show correct output. https://hg.python.org/cpython/rev/c5c65ef84a77 New changeset cc6aed8ecb0d by R David Murray in branch 'default': Merge: #24108: Update

[issue24056] Expose closure generator status in function repr()

2015-05-02 Thread R. David Murray
R. David Murray added the comment: Although I like the look of the repr Terry proposes better, I agree with Nick: it would imply that the types were distinct, which they are not. -- nosy: +r.david.murray ___ Python tracker rep...@bugs.python.org

[issue24099] Use after free in siftdown (1)

2015-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 813854f49f9d by Raymond Hettinger in branch '3.4': Issues #24099, #24100, and #24101: Fix free-after-use bug in heapq. https://hg.python.org/cpython/rev/813854f49f9d -- nosy: +python-dev ___ Python

[issue24100] Use after free in siftdown (2)

2015-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 813854f49f9d by Raymond Hettinger in branch '3.4': Issues #24099, #24100, and #24101: Fix free-after-use bug in heapq. https://hg.python.org/cpython/rev/813854f49f9d -- nosy: +python-dev ___ Python

[issue24101] Use after free in siftup

2015-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 813854f49f9d by Raymond Hettinger in branch '3.4': Issues #24099, #24100, and #24101: Fix free-after-use bug in heapq. https://hg.python.org/cpython/rev/813854f49f9d -- nosy: +python-dev ___ Python

[issue24100] Use after free in siftdown (2)

2015-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: It would be nice to add tests based on provided demo scripts. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24100 ___

Re: Python is not bad ;-)

2015-05-02 Thread Mark Lawrence
On 02/05/2015 14:50, Joonas Liik wrote: [top posting fixed] On 2 May 2015 at 14:42, Marko Rauhamaa ma...@pacujo.net wrote: Christian Gollwitzer aurio...@gmx.de: That's why I still think it is a microoptimization, which helps only in some specific cases. It isn't done for performance.

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread Eric Snow
Eric Snow added the comment: I've verified that the documentation is correct under Python 2.3. The behavior changed under Python 2.4 (and the docs were not updated). I expect that the change in behavior is an unintended consequence of a change in the import system for 2.4. There were 7 in

[issue24081] Obsolete caveat in reload() docs

2015-05-02 Thread Eric Snow
Eric Snow added the comment: patch LGTM for the 3 branches. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24081 ___ ___ Python-bugs-list

Re: l = range(int(1E9))

2015-05-02 Thread Marko Rauhamaa
BartC b...@freeuk.com: (I tried an empty loop counting to 1 billion in Python 2.x, using 'for i in range'. It ran out of memory. Counting to 100 million instead, it worked, but still used a massive 1.5GB RAM while doing so (and took 6 seconds to count to 100M, not too bad for Python)

Re: Custom alphabetical sort

2015-05-02 Thread Dave Angel
On 05/02/2015 11:35 AM, Pander Musubi wrote: On Monday, 24 December 2012 16:32:56 UTC+1, Pander Musubi wrote: Hi all, I would like to sort according to this order: (' ', '.', '\'', '-', '0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'a', 'A', 'ä', 'Ä', 'á', 'Á', 'â', 'Â', 'à', 'À', 'å',

[issue23572] functools.singledispatch fails when not BaseClass is True

2015-05-02 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: An example is Enum. -- nosy: +serhiy.storchaka ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23572 ___ ___

[issue24060] Clearify necessities for logging with timestamps

2015-05-02 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5ce760e2cc59 by Vinay Sajip in branch '2.7': Issue #24060: Made logging.Formatter documentation a little clearer. https://hg.python.org/cpython/rev/5ce760e2cc59 New changeset 88c141233d1e by Vinay Sajip in branch '3.4': Issue #24060: Made

Re: Fast way of extracting files from various folders

2015-05-02 Thread Peter Otten
subhabrata.bane...@gmail.com wrote: I have several millions of documents in several folders and subfolders in my machine. I tried to write a script as follows, to extract all the .doc files and to convert them in text, but it seems it is taking too much of time. import os from fnmatch

Canopy editor

2015-05-02 Thread lbertolotti via Python-list
I having some problems with Python editor Canopy: -- https://mail.python.org/mailman/listinfo/python-list

Canopy editor-Variables browser and help

2015-05-02 Thread lbertolotti via Python-list
Can I: 1.Enable a variable browser in Canopy editor similar to the Spyder editor? 2.Writing a function say log( gives me the function help, but I can't read the whole documentation 3.Eclipse had a auto-complete, can I enable this in Canopy? 4.Perhaps I should try using another editor? I was

Re: Inner workings of this Python feature: Can a Python data structure reference itself?

2015-05-02 Thread Tim Chase
On 2015-05-02 13:02, vasudevram wrote: Hi group, Please refer to this blog post about code showing that a Python data structure can be self-referential: http://jugad2.blogspot.in/2015/05/can-python-data-structure-reference.html Gotten a couple of comments on it already, but interested

[issue23911] Move path-based bootstrap code to a separate frozen file.

2015-05-02 Thread Eric Snow
Eric Snow added the comment: As I mentioned, I'm pretty sure that the failing venv test is due to the bundled pip. Here's the test output: test test_venv failed -- Traceback (most recent call last): File /home/esnow/projects/cpython/Lib/test/test_venv.py, line 356, in test_with_pip

Re: Inner workings of this Python feature: Can a Python data structure reference itself?

2015-05-02 Thread vasudevram
On Sunday, May 3, 2015 at 1:47:04 AM UTC+5:30, Tim Chase wrote: [dangit, had Control down when I hit enter and it sent prematurely] On 2015-05-02 13:02, vasudevram wrote: http://jugad2.blogspot.in/2015/05/can-python-data-structure-reference.html

  1   2   >