Re: card dealer

2013-09-28 Thread Steven D'Aprano
On Fri, 27 Sep 2013 17:40:46 -0400, Ned Batchelder wrote: On 9/27/13 12:10 PM, Denis McMahon wrote: On Fri, 27 Sep 2013 12:08:33 +, Dave Angel wrote: i recall writing a shuffle function in C decades ago, which took an array of (52) unique items and put them in random order. Whenever I

Re: Python Unit Tests

2013-09-28 Thread Dave Angel
On 28/9/2013 00:52, melw...@gmail.com wrote: Hey, What version of Python are you using? I'll assume 2.7, but you really should specify it (and any other meaningful environment dependencies) in your original query, the beginning of your thread. For 2.7, the docs for unittest are at:

Weird bahaviour from shlex - line no

2013-09-28 Thread Daniel Stojanov
Can somebody explain this. The line number reported by shlex depends on the previous token. I want to be able to tell if I have just popped the last token on a line. import shlex first = shlex.shlex(word1 word2\nword3) print first.get_token() print first.get_token() print line no,

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Νίκος
Στις 28/9/2013 4:59 πμ, ο/η Chris Angelico έγραψε: On Sat, Sep 28, 2013 at 8:06 AM, Νίκος nikos.gr...@gmail.com wrote: Well to tell the truth no matter what you say to me if something can be written in less lines than another implementation but still retain its simplicity and straightforward

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Νίκος
Στις 28/9/2013 1:26 πμ, ο/η Dave Angel έγραψε: On 27/9/2013 18:06, Νίκος wrote: city = Άγνωστη Πόλη host = Άγνωστη Προέλευση If they were to have the same string assigned to them it should be okey but they do not. Or perhaps you can even still think of writing the above into 1-liner

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Chris Angelico
On Sat, Sep 28, 2013 at 7:33 PM, Νίκος nikos.gr...@gmail.com wrote: It woould be nice if we could write it as: ipval = ( os.environ.get('HTTP_CF_CONNECTING_IP') or os.environ.get('REMOTE_ADDR', Cannot Resolve) ) try: gi = pygeoip.GeoIP('/usr/local/share/GeoIPCity.dat') city

Re: What's the best way to extract 2 values from a CSV file from each row systematically?

2013-09-28 Thread Luca Cerone
I'd really appreciate any suggestions or help, thanks in advance! Hi Alex if you know that you want only columns 3 and 5, you could also use list comprehension to fetch the values: import csv with open('yourfile.csv','rU') as fo: #the rU means read using Universal newlines cr =

Re: card dealer

2013-09-28 Thread Ned Batchelder
On 9/28/13 2:01 AM, Steven D'Aprano wrote: On Fri, 27 Sep 2013 17:40:46 -0400, Ned Batchelder wrote: On 9/27/13 12:10 PM, Denis McMahon wrote: On Fri, 27 Sep 2013 12:08:33 +, Dave Angel wrote: i recall writing a shuffle function in C decades ago, which took an array of (52) unique items

ANN: psutil 1.1.0 released

2013-09-28 Thread Giampaolo Rodola'
Hi there folks, I'm pleased to announce the 1.1.0 release of psutil: http://code.google.com/p/psutil/ === About === psutil is a module providing an interface for retrieving information on all running processes and system utilization (CPU, memory, disks, network, users) in a portable way by using

Re: Weird bahaviour from shlex - line no

2013-09-28 Thread Andreas Perstinger
On 28.09.2013 08:26, Daniel Stojanov wrote: Can somebody explain this. The line number reported by shlex depends on the previous token. I want to be able to tell if I have just popped the last token on a line. [SNIP] second = shlex.shlex(word1 word2,\nword3) Punctuation characters like the

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Robert Kern
On 2013-09-27 11:43, Dave Angel wrote: You should study APL. Many functions were written in one line, with twenty lines of explanation. The function itself was considered unreadable nonsense. And if a function stopped working, general wisdom was to throw it out, and re-implement the

Re: card dealer

2013-09-28 Thread Dave Angel
On 28/9/2013 06:31, Ned Batchelder wrote: snip I've thought that way about it too: there are so many shuffles any way, it won't be a problem. But think about it like this: if you shuffle a deck of 52 cards with a default Python random object, then once you have dealt out only 28

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Νίκος
Στις 28/9/2013 1:19 μμ, ο/η Chris Angelico έγραψε: On Sat, Sep 28, 2013 at 7:33 PM, Νίκος nikos.gr...@gmail.com wrote: It woould be nice if we could write it as: ipval = ( os.environ.get('HTTP_CF_CONNECTING_IP') or os.environ.get('REMOTE_ADDR', Cannot Resolve) ) try: gi =

Re: Weird bahaviour from shlex - line no

2013-09-28 Thread Dave Angel
On 28/9/2013 02:26, Daniel Stojanov wrote: Can somebody explain this. The line number reported by shlex depends on the previous token. I want to be able to tell if I have just popped the last token on a line. I agree that it seems weird. However, I don't think you have made clear why it's

Re: Weird bahaviour from shlex - line no

2013-09-28 Thread Peter Otten
Dave Angel wrote: On 28/9/2013 02:26, Daniel Stojanov wrote: Can somebody explain this. The line number reported by shlex depends on the previous token. I want to be able to tell if I have just popped the last token on a line. I agree that it seems weird. However, I don't think you

Neurolab // No module named ..

2013-09-28 Thread FiveHydroxy Tryptamine
Hiya A word of warning, I am a complete beginner. My problem goes like this:: I've been trying to import neurolab as nl(a neural network library)and I keep getting the No module named.. error in my Python 2.7.3 shell. There is definitely something wrong with my Python path, although everything

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Andreas Perstinger
Νίκος nikos.gr...@gmail.com wrote: Στις 28/9/2013 1:19 μμ, ο/η Chris Angelico έγραψε: [ROLL] Rosuav rolls his eyes: 1, 1, totalling 2. Then split your try blocks! You've already been told this. No we didn't have said this. if you are referring to this: At least Denis told you about 24 hours

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Antoon Pardon
Op 28-09-13 00:06, Νίκος schreef: Στις 27/9/2013 8:00 μμ, ο/η Grant Edwards έγραψε: On 2013-09-27, ?? nikos.gr...@gmail.com wrote: Sure your method follows the the logic in a straighforward way step-by-step but i just dont want to spent almost 20 lines of code just to calculate 2

Re: card dealer

2013-09-28 Thread Antoon Pardon
Op 28-09-13 12:31, Ned Batchelder schreef: On 9/28/13 2:01 AM, Steven D'Aprano wrote: On Fri, 27 Sep 2013 17:40:46 -0400, Ned Batchelder wrote: On 9/27/13 12:10 PM, Denis McMahon wrote: On Fri, 27 Sep 2013 12:08:33 +, Dave Angel wrote: i recall writing a shuffle function in C decades

Re: Neurolab // No module named ..

2013-09-28 Thread Joel Goldstick
On Sat, Sep 28, 2013 at 10:55 AM, FiveHydroxy Tryptamine lilithsol...@gmail.com wrote: Hiya A word of warning, I am a complete beginner. My problem goes like this:: I've been trying to import neurolab as nl(a neural network library)and I keep getting the No module named.. error in my Python

replace only full words

2013-09-28 Thread cerr
Hi, I have a list of sentences and a list of words. Every full word that appears within sentence shall be extended by WORD i.e. I drink in the house. Would become I drink in the house. (and not I drink in the house.)I have attempted it like this: for sentence in sentences: for noun in

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Joel Goldstick
On Sat, Sep 28, 2013 at 9:53 AM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Op 28-09-13 00:06, Νίκος schreef: Στις 27/9/2013 8:00 μμ, ο/η Grant Edwards έγραψε: On 2013-09-27, ?? nikos.gr...@gmail.com wrote: Sure your method follows the the logic in a straighforward way

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Νίκος
Στις 28/9/2013 6:02 μμ, ο/η Andreas Perstinger έγραψε: Νίκος nikos.gr...@gmail.com wrote: Στις 28/9/2013 1:19 μμ, ο/η Chris Angelico έγραψε: [ROLL] Rosuav rolls his eyes: 1, 1, totalling 2. Then split your try blocks! You've already been told this. No we didn't have said this. if you are

Re: Help me with Python please (picture)

2013-09-28 Thread dvghana
On Saturday, September 28, 2013 12:43:42 AM UTC, jae...@gmail.com wrote: http://imgur.com/E6vrNs4 Can't seem to be getting an output. All the comments about using an image to ask for help over here is extremely valid so I hope you accept it in good faith. I am a noob like you so I

Which Python Framework for REST API and Facebook Wrapper?

2013-09-28 Thread harry . andrei
I will be designing a REST based API for a cross-platform back end that will serve both desktop Facebook users as well as mobile users. It will handle operations such as user creation, retrieval of user and other data, payment verification and in the case of the desktop side, handle the

Re: Which Python Framework for REST API and Facebook Wrapper?

2013-09-28 Thread Joel Goldstick
On Sat, Sep 28, 2013 at 12:20 PM, harry.and...@gmail.com wrote: I will be designing a REST based API for a cross-platform back end that will serve both desktop Facebook users as well as mobile users. It will handle operations such as user creation, retrieval of user and other data, payment

Re: Neurolab // No module named ..

2013-09-28 Thread Dave Angel
On 28/9/2013 10:55, FiveHydroxy Tryptamine wrote: Hiya A word of warning, I am a complete beginner. My problem goes like this:: I've been trying to import neurolab as nl(a neural network library)and I keep getting the No module named.. error in my Python 2.7.3 shell. There is definitely

Re: Help me with Python please (picture)

2013-09-28 Thread Joel Goldstick
On Sat, Sep 28, 2013 at 12:17 PM, dvgh...@gmail.com wrote: On Saturday, September 28, 2013 12:43:42 AM UTC, jae...@gmail.com wrote: http://imgur.com/E6vrNs4 Can't seem to be getting an output. All the comments about using an image to ask for help over here is extremely valid so

Re: replace only full words

2013-09-28 Thread Tim Chase
On 2013-09-28 09:11, cerr wrote: I have a list of sentences and a list of words. Every full word that appears within sentence shall be extended by WORD i.e. I drink in the house. Would become I drink in the house. (and not I drink in the house.) This is a good place to reach for regular

Re: replace only full words

2013-09-28 Thread MRAB
On 28/09/2013 17:11, cerr wrote: Hi, I have a list of sentences and a list of words. Every full word that appears within sentence shall be extended by WORD i.e. I drink in the house. Would become I drink in the house. (and not I drink in the house.)I have attempted it like this: for

automated unit test generation

2013-09-28 Thread skunkwerk
Hi, I've been working on an open source project to auto-generate unit tests for web apps based on traces collected from the web server and static code analysis. I've got an alpha version online at www.splintera.com, and the source is at https://github.com/splintera/python-django-client.

Re: Help me with Python please (picture)

2013-09-28 Thread Dave Angel
On 28/9/2013 12:17, dvgh...@gmail.com wrote: On Saturday, September 28, 2013 12:43:42 AM UTC, jae...@gmail.com wrote: Can't seem to be getting an output. snip Overall I wrote my own version of the code and this is what I got: ** import string import random

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread rusi
On Friday, September 27, 2013 4:13:52 PM UTC+5:30, Dave Angel wrote: You should study APL. Many functions were written in one line, with twenty lines of explanation. The function itself was considered unreadable nonsense. And if a function stopped working, general wisdom was to throw it out,

Re: replace only full words

2013-09-28 Thread Jussi Piitulainen
MRAB writes: On 28/09/2013 17:11, cerr wrote: Hi, I have a list of sentences and a list of words. Every full word that appears within sentence shall be extended by WORD i.e. I drink in the house. Would become I drink in the house. (and not I drink in the house.)I have attempted it

Re: replace only full words

2013-09-28 Thread cerr
On Saturday, September 28, 2013 4:54:35 PM UTC, Tim Chase wrote: On 2013-09-28 09:11, cerr wrote: I have a list of sentences and a list of words. Every full word that appears within sentence shall be extended by WORD i.e. I drink in the house. Would become I drink in the house. (and

Re: automated unit test generation

2013-09-28 Thread Paul Rubin
skunkwerk skunkw...@gmail.com writes: - how difficult/tedious is writing unit tests, and why? The important thing is to write the tests at the same time as the code. If you do that, it's not too bad. It means the code is then organized around the tests and vice versa. Keeping tests in sync

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Mark Lawrence
On 28/09/2013 17:14, Νίκος wrote: I know what he has said bit this is now what i need. You actually need the tool that was used on King Edward II. -- Cheers. Mark Lawrence -- https://mail.python.org/mailman/listinfo/python-list

Re: replace only full words

2013-09-28 Thread MRAB
On 28/09/2013 18:43, cerr wrote: [snip] Great, only I don't have the re module on my system :( Really? It's part of Python's standard distribution. -- https://mail.python.org/mailman/listinfo/python-list

Re: replace only full words

2013-09-28 Thread Tim Chase
[mercy, you could have trimmed down that reply] On 2013-09-28 10:43, cerr wrote: On Saturday, September 28, 2013 4:54:35 PM UTC, Tim Chase wrote: import re Great, only I don't have the re module on my system :( Um, it's a standard Python library. You sure about that?

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Joel Goldstick
On Sat, Sep 28, 2013 at 1:53 PM, Mark Lawrence breamore...@yahoo.co.ukwrote: On 28/09/2013 17:14, Νίκος wrote: I know what he has said bit this is now what i need. You actually need the tool that was used on King Edward II. -- Cheers. Mark Lawrence --

Re: replace only full words

2013-09-28 Thread cerr
On Saturday, September 28, 2013 11:07:11 AM UTC-7, MRAB wrote: On 28/09/2013 18:43, cerr wrote: [snip] Great, only I don't have the re module on my system :( Really? It's part of Python's standard distribution. Oh no, sorry, mis-nformation, i DO have module re available!!! All

Re: replace only full words

2013-09-28 Thread cerr
On Saturday, September 28, 2013 11:17:19 AM UTC-7, Tim Chase wrote: [mercy, you could have trimmed down that reply] On 2013-09-28 10:43, cerr wrote: On Saturday, September 28, 2013 4:54:35 PM UTC, Tim Chase wrote: import re Great, only I don't have the re module on my

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Zero Piraeus
: On Sat, Sep 28, 2013 at 1:53 PM, Mark Lawrence breamore...@yahoo.co.ukwrote: You actually need the tool that was used on King Edward II. To be clear, Mark, you are calling for Νίκος to be tortured to death with a red hot poker, yes? I'm going to go out on a limb and suggest that such a

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Mark Lawrence
On 28/09/2013 19:38, Zero Piraeus wrote: : On Sat, Sep 28, 2013 at 1:53 PM, Mark Lawrence breamore...@yahoo.co.ukwrote: You actually need the tool that was used on King Edward II. To be clear, Mark, you are calling for Νίκος to be tortured to death with a red hot poker, yes? I'm going to

Re: Python Unit Tests

2013-09-28 Thread Terry Reedy
On 9/28/2013 12:52 AM, melw...@gmail.com wrote: [How can I test...] import random intro = 'I have chosen a number from 1-10' request = 'Guess a number: ' responseHigh = That's too high. responseLow = That's too low. responseCorrect = That's right! goodbye = 'Goodbye and thanks for playing!'

Re: Neurolab // No module named ..

2013-09-28 Thread Terry Reedy
On 9/28/2013 10:55 AM, FiveHydroxy Tryptamine wrote: Hiya A word of warning, I am a complete beginner. My problem goes like this:: I've been trying to import neurolab as nl(a neural network library)and I keep getting the No module named.. error in my Python 2.7.3 shell. There is definitely

Re: Neurolab // No module named ..

2013-09-28 Thread Mark Lawrence
On 28/09/2013 15:55, FiveHydroxy Tryptamine wrote: Hiya A word of warning, I am a complete beginner. My problem goes like this:: I've been trying to import neurolab as nl(a neural network library)and I keep getting the No module named.. error in my Python 2.7.3 shell. There is definitely

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Steven D'Aprano
On Sat, 28 Sep 2013 19:45:40 +0100, Mark Lawrence wrote: Not tortured, simply murdered If your aim was to prove that you're a waste of space than Nikos, you've admirably succeeded. *plonk* -- Steven -- https://mail.python.org/mailman/listinfo/python-list

Re: Neurolab // No module named ..

2013-09-28 Thread MRAB
On 28/09/2013 20:06, Mark Lawrence wrote: On 28/09/2013 15:55, FiveHydroxy Tryptamine wrote: Hiya A word of warning, I am a complete beginner. My problem goes like this:: I've been trying to import neurolab as nl(a neural network library)and I keep getting the No module named.. error in my

Re: Understanding how is a function evaluated using recursion

2013-09-28 Thread Peter Cacioppi
On Thursday, September 26, 2013 7:23:47 AM UTC-7, Neil Cerutti wrote: On 2013-09-26, Neil Cerutti ne...@norwich.edu wrote: def flatten(seq): [1] http://en.wiktionary.org/wiki/bikeshed In that spirit, it occurs to me that given current Python nomenclature, 'flattened' would

Re: Weird bahaviour from shlex - line no

2013-09-28 Thread Piet van Oostrum
Peter Otten __pete...@web.de writes: Dave Angel wrote: On 28/9/2013 02:26, Daniel Stojanov wrote: Can somebody explain this. The line number reported by shlex depends on the previous token. I want to be able to tell if I have just popped the last token on a line. [...] The explanation

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Chris Angelico
On Sun, Sep 29, 2013 at 4:45 AM, Mark Lawrence breamore...@yahoo.co.uk wrote: Not tortured, simply murdered so we don't have to put up with his completely unacceptable behaviour, which sadly is thriving owing to so many people ignoring the do not feed this moron signs. You miss one important

Re: card dealer

2013-09-28 Thread Tim Roberts
Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Op 28-09-13 12:31, Ned Batchelder schreef: I've thought that way about it too: there are so many shuffles any way, it won't be a problem. But think about it like this: if you shuffle a deck of 52 cards with a default Python random object,

Re: Handling 3 operands in an expression without raising an exception

2013-09-28 Thread Ben Finney
Mark Lawrence breamore...@yahoo.co.uk writes: On 28/09/2013 19:38, Zero Piraeus wrote: To be clear, Mark, you are calling for Νίκος to be tortured to death with a red hot poker, yes? Not tortured, simply murdered so we don't have to put up with his completely unacceptable behaviour

[issue19040] Problems with overriding Enum.__new__

2013-09-28 Thread Ethan Furman
Changes by Ethan Furman et...@stoneleaf.us: -- resolution: - fixed stage: patch review - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19040 ___

[issue19030] inspect.getmembers and inspect.classify_class_attrs mishandle descriptors

2013-09-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 96081e7526f0 by Ethan Furman in branch 'default': Issue19030: fixed comment that was still referring to a changed descriptor. http://hg.python.org/cpython/rev/96081e7526f0 -- ___ Python tracker

[issue14365] argparse: subparsers, argument abbreviations and ambiguous option

2013-09-28 Thread paul j3
paul j3 added the comment: I think the correction to the problem that I noted in the previous post is to return 'None, arg_string, None', rather than 'action, arg_string, None' in the case where the action is found in a subparser. This is what '_parse_optional' does at the end: # it

[issue14365] argparse: subparsers, argument abbreviations and ambiguous option

2013-09-28 Thread paul j3
paul j3 added the comment: In the last patch, 'parser.scan = True' is needed to activate this fix. I left that switch in for testing convenience. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue14365

[issue19110] PEP-0 history link is broken

2013-09-28 Thread anatoly techtonik
New submission from anatoly techtonik: See http://www.python.org/dev/peps/, click Last-Modified. -- assignee: docs@python components: Documentation messages: 198509 nosy: docs@python, techtonik priority: normal severity: normal status: open title: PEP-0 history link is broken

[issue19094] urljoin should raise a TypeError if URL is not a string

2013-09-28 Thread Vajrasky Kok
Vajrasky Kok added the comment: I modified the patch to handle the last case using your way as well. Anyway, I found out that urlsplit and urlparse got the same issue as well. urlparse('python.org', b'http://') Traceback (most recent call last): File stdin, line 1, in module File

[issue18990] Return root element from ElementTree.XMLPullParser.close() to match ElementTree.XMLParser

2013-09-28 Thread Stefan Behnel
Stefan Behnel added the comment: Eli didn't explicitly comment on the patch so far, but let me quote some of his earlier comments: if the reader discards parts of the tree (by deleting subtrees), then returning the root from close() becomes even more meaningless, because it's no longer

[issue19001] test_gdb fails on Fedora buildbot

2013-09-28 Thread Stefan Krah
Stefan Krah added the comment: Nick Coghlan rep...@bugs.python.org wrote: My F19 system (which works) shows gdb-7.6-34, while the new debugging output Antoine added shows 7.3.50.20110722-16.fc16 on F16 Maybe the new gdb version check needs to be looking for 7.4+ rather than 7.3+? Yes,

[issue18990] Remove root attribute from XMLPullParser

2013-09-28 Thread Nick Coghlan
Changes by Nick Coghlan ncogh...@gmail.com: -- title: Return root element from ElementTree.XMLPullParser.close() to match ElementTree.XMLParser - Remove root attribute from XMLPullParser ___ Python tracker rep...@bugs.python.org

[issue18990] Remove root attribute from XMLPullParser

2013-09-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset c5e206b9df2e by Nick Coghlan in branch 'default': Close #18990: remove root attribute from XMLPullParser http://hg.python.org/cpython/rev/c5e206b9df2e -- nosy: +python-dev resolution: - fixed stage: - committed/rejected status: open -

[issue18990] Remove root attribute from XMLPullParser

2013-09-28 Thread Nick Coghlan
Nick Coghlan added the comment: We're not changing XMLPullParser.close() to return anything other than None, so the unit tests now check for this, and this behaviour is explicitly documented with users redirected towards read_events() instead. This is consistent with the XMLParser.close()

[issue18990] Remove root attribute from XMLPullParser

2013-09-28 Thread Stefan Behnel
Stefan Behnel added the comment: Thanks, Nick. Your changes look good to me. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18990 ___ ___

[issue19078] Allow reversed(memoryview), like memoryview

2013-09-28 Thread Stefan Krah
Stefan Krah added the comment: Yes, len() should return the number of items. +1 for making reversed() work. NumPy does this: x = numpy.array([1,2,3,4,5,6,7,8]) list(reversed(x)) [8, 7, 6, 5, 4, 3, 2, 1] x = numpy.array([[1,2,3], [4,5,6]]) list(reversed(x)) [array([4, 5, 6]), array([1, 2,

[issue18596] enable usage of AddressSanitizer in CPython [PATCH]

2013-09-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset f6792f734fcc by Nick Coghlan in branch 'default': Close #18596: Support address sanity checking in clang/GCC http://hg.python.org/cpython/rev/f6792f734fcc -- nosy: +python-dev resolution: - fixed stage: patch review - committed/rejected

[issue19078] Allow reversed(memoryview), like memoryview

2013-09-28 Thread Stefan Krah
Stefan Krah added the comment: Hmm, I meant: Number of items in the first dimension, thus 4 in Claudiu's example. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19078 ___

[issue18596] enable usage of AddressSanitizer in CPython [PATCH]

2013-09-28 Thread Nick Coghlan
Nick Coghlan added the comment: Incorporated, but as Charles-François noted, a buildbot running with it enabled would be nice. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18596 ___

[issue19086] Make fsum usable incrementally.

2013-09-28 Thread Oscar Benjamin
Oscar Benjamin added the comment: Thanks for responding Raymond. Raymond Hettinger wrote: A start argument won't help you, because you will discard information on input. A sequence like [1E100, 0.1, -1E100, 0.1] wouldn't work when split into subtotal=fsum([1E100, 0.1]) and fsum([-1E100, 0.1],

[issue19111] 2to3 should remove from future_builtins import *

2013-09-28 Thread Peter
New submission from Peter: The 2to3 script should remove lines like this: from future_builtins import zip after running the zip fixer which respects the meaning of this command (issue 217). It does not, which results in an ImportError when trying to use the converted code under Python 3.

[issue10042] functools.total_ordering fails to handle NotImplemented correctly

2013-09-28 Thread Nick Coghlan
Nick Coghlan added the comment: Updated patch that includes the simplified OrderedEnum example in the enum docs and also updates the enum tests to check that type errors are correctly raised between different kinds of ordered enum. -- nosy: +ethan.furman priority: low - normal

[issue10042] functools.total_ordering fails to handle NotImplemented correctly

2013-09-28 Thread Nick Coghlan
Nick Coghlan added the comment: Raymond, I'm happy to leave this until alpha 4, but I'm raising the priority a bit since I think the inclusion of Enum in the standard library increases the chances of people wanting to use functools.total_ordering to avoid writing out the comparison methods in

[issue18594] C accelerator for collections.Counter is slow

2013-09-28 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- nosy: -eli.bendersky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18594 ___ ___ Python-bugs-list

[issue19010] Make XMLPullParser in ElementTree inherit from XMLParser

2013-09-28 Thread Eli Bendersky
Changes by Eli Bendersky eli...@gmail.com: -- resolution: - wont fix stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19010 ___

[issue19010] Make XMLPullParser in ElementTree inherit from XMLParser

2013-09-28 Thread Stefan Behnel
Stefan Behnel added the comment: Any comment and/or reason? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19010 ___ ___ Python-bugs-list

[issue16079] list duplicate test names with patchcheck

2013-09-28 Thread Xavier de Gaye
Xavier de Gaye added the comment: duplicate_code_names_2.py uses tokenize to print duplicate code names within the same scope, excluding property setter/getter/deleter duplicates, excluding duplicates of nested classes or functions, and ignoring duplicates listed in a file (run with --help for

[issue16079] list duplicate test names with patchcheck

2013-09-28 Thread Xavier de Gaye
Changes by Xavier de Gaye xdeg...@gmail.com: Added file: http://bugs.python.org/file31892/ignored_duplicates ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue16079 ___

[issue18902] Make ElementTree event handling more modular to allow custom targets for the non-blocking parser

2013-09-28 Thread Stefan Behnel
Stefan Behnel added the comment: Closing #18990 defines the API of the new XMLPullParser that 3.4 will ship with, so this ticket becomes an enhancement for future versions. -- type: behavior - enhancement versions: -Python 3.4 ___ Python tracker

[issue19112] tests of _TestProcess are not run by the multiprocessing test suite

2013-09-28 Thread Xavier de Gaye
New submission from Xavier de Gaye: class _TestProcess in Lib/test/_test_multiprocessing.py is overshadowed by a function of the same name. And test_current is its first method: $ ./python -m test -v test_multiprocessing_fork | grep test_current $ With the attached patch: $ ./python -m test

[issue19010] Make XMLPullParser in ElementTree inherit from XMLParser

2013-09-28 Thread Eli Bendersky
Eli Bendersky added the comment: Discussed in #18990 Future discussions of this class belong in #18902 -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19010 ___

[issue19113] duplicate test names in Lib/ctypes/test/test_functions.py

2013-09-28 Thread Xavier de Gaye
New submission from Xavier de Gaye: After renaming the first test_errors method to test_errors_1 and the second one to test_errors_2: $ /bin/sh -c cd Lib/ctypes/test; ../../../python runtests.py test_functions.py F

[issue19112] tests of _TestProcess are not run by the multiprocessing test suite

2013-09-28 Thread Richard Oudkerk
Changes by Richard Oudkerk shibt...@gmail.com: -- nosy: +sbt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19112 ___ ___ Python-bugs-list mailing

[issue11344] Add os.path.splitpath(path) function

2013-09-28 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' g.rod...@gmail.com: -- nosy: +giampaolo.rodola ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue11344 ___ ___

[issue19114] duplicate test names in Lib/distutils/tests/test_cmd.py

2013-09-28 Thread Xavier de Gaye
New submission from Xavier de Gaye: $ ./python -m unittest -v Lib/distutils/tests/test_cmd.py 21 | grep test_ensure_string_list test_ensure_string_list (Lib.distutils.tests.test_cmd.CommandTestCase) ... ok $ And after renaming the first test_ensure_string_list to test_ensure_string_list_1 and

[issue19115] duplicate test names in Lib/lib2to3/tests/test_fixers.py

2013-09-28 Thread Xavier de Gaye
New submission from Xavier de Gaye: There are 5 duplicate test names in this file. $ ./python -m unittest Lib/lib2to3/tests/test_fixers.py .. -- Ran 451 tests

[issue19107] CSV output of benchmark runner tries to write to binary file

2013-09-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 07a8440b3987 by Antoine Pitrou in branch 'default': Issue #19107: fix csv output with Python 3 http://hg.python.org/benchmarks/rev/07a8440b3987 -- nosy: +python-dev ___ Python tracker

[issue19107] CSV output of benchmark runner tries to write to binary file

2013-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed! -- resolution: - fixed stage: - committed/rejected status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19107 ___

[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting

2013-09-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 921177a65386 by Antoine Pitrou in branch 'default': Issue #19108: fix str/bytes mismatch when raising exception under Python 3 http://hg.python.org/benchmarks/rev/921177a65386 -- nosy: +python-dev ___

[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting

2013-09-28 Thread Antoine Pitrou
Antoine Pitrou added the comment: Ok, I've fixed the str/bytes mismatch. I don't have any strong feelings about the rest, other than whoever wants perf.py to work with wrapper scripts should probably propose a patch. I'll let Brett decide. -- ___

[issue19108] Benchmark runner tries to execute external Python command and fails on error reporting

2013-09-28 Thread Stefan Behnel
Stefan Behnel added the comment: Well, it worked before, so the current state is clearly a regression. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue19108 ___

[issue18902] Make ElementTree event handling more modular to allow custom targets for the non-blocking parser

2013-09-28 Thread Stefan Behnel
Stefan Behnel added the comment: Copying a relevant comment by Eli from http://bugs.python.org/issue18990#msg198145 and replying inline. The way the APIs are currently defined, XMLParser and XMLPullParser are different animals. XMLParser can be considered to only have one front in the API -

[issue18950] Miscellaneous fixes for the sunau module

2013-09-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 41ed98a93236 by Serhiy Storchaka in branch '3.3': Issue #18950: Fix miscellaneous bugs in the sunau module. http://hg.python.org/cpython/rev/41ed98a93236 New changeset 9e54def97a5e by Serhiy Storchaka in branch 'default': Issue #18950: Fix

[issue19116] duplicate test names in Lib/test/test_complex.py

2013-09-28 Thread Xavier de Gaye
New submission from Xavier de Gaye: $ ./python -m test -v test_complex | grep test_truediv test_truediv (test.test_complex.ComplexTest) ... ok After renaming the first test_truediv to test_truediv_1 and the second one to test_truediv_2: $ ./python -m test -v test_complex | grep test_truediv

[issue19110] PEP-0 history link is broken

2013-09-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset aba730d39749 by Ned Deily in branch 'default': Issue #19110: Surpress Last-Modified link in PEP 0 html http://hg.python.org/peps/rev/aba730d39749 -- nosy: +python-dev ___ Python tracker

[issue19115] duplicate test names in Lib/lib2to3/tests/test_fixers.py

2013-09-28 Thread Roundup Robot
Roundup Robot added the comment: New changeset 39bb7421cb69 by Benjamin Peterson in branch '2.7': fix duplicate test names (closes #19115) http://hg.python.org/cpython/rev/39bb7421cb69 New changeset 6bf37e2cbe83 by Benjamin Peterson in branch '3.3': fix duplicate test names (closes #19115)

[issue19117] duplicate test names in Lib/test/test_dis.py

2013-09-28 Thread Xavier de Gaye
New submission from Xavier de Gaye: Duplicate method names: ./Lib/test/test_dis.py:250 DisTests.test_big_linenos ./Lib/test/test_dis.py:294 DisTests.test_dis_object The attached patch fixes this. -- components: Library (Lib) files: duplicate_test_name.patch keywords: patch messages:

[issue19118] duplicate test names in Lib/test/test_ftplib.py

2013-09-28 Thread Xavier de Gaye
New submission from Xavier de Gaye: Duplicate method names: ./Lib/test/test_ftplib.py:537 TestFTPClass.test_mkd The attached patch fixes this. -- components: Library (Lib) files: duplicate_test_name.patch keywords: patch messages: 198543 nosy: giampaolo.rodola, xdegaye priority: normal

[issue19058] test_sys.test_ioencoding_nonascii() fails with ASCII locale encoding

2013-09-28 Thread STINNER Victor
STINNER Victor added the comment: Here is a patch. It uses same algorithm to obtain encodable non-ASCII string as for FS_NONASCII, but with locale encoding. It also adds new tests and simplifies existing tests. I don't like your patch. The purpose of PYTHONIOENCODING is to set

  1   2   >