Re: 'is not' or '!='

2014-08-21 Thread Marko Rauhamaa
Rustom Mody rustompm...@gmail.com: OP asks for 'is' (Haskell has no equivalent of 'is') Almost all the answers explain why its a bad idea Well, I don't think it is a bad idea in and of itself, but if you don't have it, you don't have to define it. Object identity does make you look under the

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Everything You Need To Know
On Thursday, 21 August 2014 15:19:43 UTC+9:30, Chris Angelico wrote: On Thu, Aug 21, 2014 at 3:38 PM, Everything You Need To Know ey...@outlook.com wrote: You are now simply arguing a negative point for no apparent reason other than you want to appear correct, I have already admitted

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Ben Finney
Everything You Need To Know ey...@outlook.com writes: You are now simply arguing a negative point for no apparent reason other than you want to appear correct, I have already admitted my mistake yet you persist with negativity and vitriol, it is quiet childish. Observers will judge the

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Ian Kelly
On Aug 20, 2014 9:51 PM, Everything You Need To Know ey...@outlook.com wrote: I will post updates on one Post so as not to create new posts and I am not making any money from this, also google owns youtube so I am only helping google the owner of this Forum? Google does not own or control this

Re: Test failure while building cpython

2014-08-21 Thread Terry Reedy
On 8/20/2014 8:24 PM, Adam Bishop wrote: Or you can ignore it. It's a little tricky with mock, as failures during the test phase are fatal. Unfortunately, I have no idea what 'mock' is in this context. Thanks for pointing me in the right direction. If you possibly can, also act on

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Everything You Need To Know
On Thursday, 21 August 2014 14:33:19 UTC+9:30, Ian wrote: On Aug 20, 2014 9:51 PM, Everything You Need To Know ey...@outlook.com wrote: I will post updates on one Post so as not to create new posts and I am not making any money from this, also google owns youtube so I am only helping

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Ben Finney
Everything You Need To Know ey...@outlook.com writes: On Thursday, 21 August 2014 14:33:19 UTC+9:30, Ian wrote: Google does not own or control this forum. The comp.lang.python group is part of Usenet, which is not owned by anybody. The group is also bridged to the python-list mailing list

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Chris Angelico
On Thu, Aug 21, 2014 at 4:09 PM, Everything You Need To Know ey...@outlook.com wrote: On Thursday, 21 August 2014 15:19:43 UTC+9:30, Chris Angelico wrote: On Thu, Aug 21, 2014 at 3:38 PM, Everything You Need To Know ey...@outlook.com wrote: You are now simply arguing a negative point for

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Everything You Need To Know
On Thursday, 21 August 2014 16:20:29 UTC+9:30, Chris Angelico wrote: On Thu, Aug 21, 2014 at 4:09 PM, Everything You Need To Know ey...@outlook.com wrote: On Thursday, 21 August 2014 15:19:43 UTC+9:30, Chris Angelico wrote: On Thu, Aug 21, 2014 at 3:38 PM, Everything You Need To Know

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Terry Reedy
On 8/20/2014 11:36 AM, Everything You Need To Know wrote: Neat little exercise, surprisingly cool results! less than 3 minutes! https://www.youtube.com/watch?v=PlDjl5JK0eUfeature=youtu.be Dear EYNToK (Adam Nowak?, the name on the video?): I am both a long-term participant in this group and

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Everything You Need To Know
On Thursday, 21 August 2014 16:55:44 UTC+9:30, Terry Reedy wrote: On 8/20/2014 11:36 AM, Everything You Need To Know wrote: Neat little exercise, surprisingly cool results! less than 3 minutes! https://www.youtube.com/watch?v=PlDjl5JK0eUfeature=youtu.be Dear EYNToK (Adam

proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread icefapper
Hi, just wanting to do a shot in the dark,but maybe this syntax is Pythonic (in a we-are-all-grown-ups fashion, ahem)enough to get its way into the language this is what yours truly thinks: don't we all know that : means the next token must be an indent (mostly)? and doesn't the ( and its

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Mark Lawrence
On 21/08/2014 03:07, Everything You Need To Know wrote: You'd make more friends here if you weren't suffering from google groups disease, which seems to be spreading like wildfire at the moment. To cure this terrible affliction please access this list via

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Mark Lawrence
On 21/08/2014 07:09, Everything You Need To Know wrote: I am just finishing this thread, as I said it will take a little time, I am trying to collaborate with more than one person. You are certainly very trying. I see no evidence of collaboration. I also see no evidence of the vitriol

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread Chris Angelico
Ah, here we go again! It's multi-line lambda season. Comes around as regularly as duck-typing season, rabbit seasoning, baseball season, and other Looney Tunes references. :) On Thu, Aug 21, 2014 at 5:55 PM, icefap...@gmail.com wrote: doFunc(def(): print( anon ) return gvr) What I'm

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Mark Lawrence
On 21/08/2014 07:52, Everything You Need To Know wrote: I have answered all these questions already! stop wasting time I entirely agree, stop wasting time. Hardly surprising you didn't get on at uni as that involves engaging with people. You can't take the mildest criticism and refuse

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Chris “Kwpolska” Warrick
On Thu, Aug 21, 2014 at 3:22 AM, Everything You Need To Know ey...@outlook.com wrote: I do understand where you are coming from 'Chris Kwpolska Warrick', though, your own self serving link to your own website and unproductive post is closer to spam than my own, I offer something practical and

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Mark Lawrence
On 21/08/2014 08:40, Everything You Need To Know wrote: On Thursday, 21 August 2014 16:55:44 UTC+9:30, Terry Reedy wrote: On 8/20/2014 11:36 AM, Everything You Need To Know wrote: Neat little exercise, surprisingly cool results! less than 3 minutes!

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread icefapper
reasonable, but I don't like the close parens on the same line; even if this syntax is allowed, I'd frown on it in style guides, thanks, bu what exactly do you find unlikeable in this syntax? the ) is no new syntax, but simply a match for a previous (; and you can put it anywhere because

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread Chris Angelico
On Thu, Aug 21, 2014 at 6:59 PM, icefap...@gmail.com wrote: thanks, bu what exactly do you find unlikeable in this syntax? the ) is no new syntax, but simply a match for a previous (; and you can put it anywhere because the ( contents are space-insensitive: this would be a syntax error: a

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread icefapper
reasonable, but I don't like the close parens on the same line; even if this syntax is allowed, I'd frown on it in style guides, thanks, bu what exactly do you find unlikeable in this syntax? the ) is no new syntax, but simply a match for a previous (; and you can put it anywhere because

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread icefapper
it is simply a matter of convenience: def a(): print( gvr ) func(a); or func( def(): print(gvr) ) it would be great if others could further share their opinions -- https://mail.python.org/mailman/listinfo/python-list

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread Marko Rauhamaa
icefap...@gmail.com: it is simply a matter of convenience: def a(): print( gvr ) func(a); or func( def(): print(gvr) ) it would be great if others could further share their opinions In practice, your proposal would not make life easier for Python programmers. Marko --

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread icefapper
tag_handler = { span: lambda content: content, div: lambda content: \n+content+\n, p: lambda content: \n+content+\n, br: lambda content: \n, } If you wanted to expand one of those to have statements in it, you'd have to take it out-of-line and break the

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread icefapper
On Thursday, August 21, 2014 2:27:08 AM UTC-7, Marko Rauhamaa wrote: In practice, your proposal would not make life easier for Python programmers. Marko neither did the lambda, yours truly supposes? -- https://mail.python.org/mailman/listinfo/python-list

ANN: PyDDF Sprint 2014

2014-08-21 Thread eGenix Team: M.-A. Lemburg
[This announcement is in German since it targets a local user group sprint in Düsseldorf, Germany] ANKÜNDIGUNG PyDDF Sprint 2014 27/28.09.2014

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread Terry Reedy
On 8/21/2014 5:14 AM, icefap...@gmail.com wrote: it is simply a matter of convenience: def a(): print( gvr ) func(a); or func( def(): print(gvr) ) it would be great if others could further share their opinions I have, multiple time in previous threads. A bad idea. Unnecessary.

Python vs C++

2014-08-21 Thread David Palao
Hello, I consider myself a python programmer, although C++ was one of the first languages I learned (not really deeply and long time ago). Now I decided to retake C++, to broaden my view of the business. However, as I progress in learning C++, I cannot take out of my head one question Why to

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Everything You Need To Know
On Thursday, 21 August 2014 01:06:37 UTC+9:30, Everything You Need To Know wrote: These exercises were all linked together to make a 'python' board game, Thought it was really neat myself. This is something that would not interest this Forum I am to presume? Thank you Adam A --

Re: Python vs C++

2014-08-21 Thread Burak Arslan
On 08/21/14 15:54, David Palao wrote: But I'm interested in a genuine C++ project: some task where C++ is really THE language (and where python is actually a bad ab initio choice) For my day job, I chose Qt on C++ for a classic desktop app that needs to be deployed on Windows (among other

Re: Python vs C++

2014-08-21 Thread Chris Angelico
On Thu, Aug 21, 2014 at 10:54 PM, David Palao dpalao.pyt...@gmail.com wrote: Why to use C++ instead of python? This is, perhaps, a bit off-topic, but I really want to know the thoughts of experienced python programmers on it. No, it's a fair question. Why are we all here? The fact is,

Re: Python vs C++

2014-08-21 Thread Neil D. Cerutti
On 8/21/2014 8:54 AM, David Palao wrote: Hello, I consider myself a python programmer, although C++ was one of the first languages I learned (not really deeply and long time ago). Hey, that sounds just like me. Now I decided to retake C++, to broaden my view of the business. However, as I

Distinguishing attribute name from varible name to make codes clear and definite

2014-08-21 Thread luofeiyu
I feel that self.x and x will be confused in the following codes. class MyDescriptor(object): def __init__(self, x): self.x = x def __get__(self, instance, owner): print('get from descriptor') return self.x def __set__(self,

Re: Python vs C++

2014-08-21 Thread Rustom Mody
On Thursday, August 21, 2014 6:24:18 PM UTC+5:30, David Palao wrote: Hello, I consider myself a python programmer, although C++ was one of the first languages I learned (not really deeply and long time ago). Now I decided to retake C++, to broaden my view of the business. However, as I

Re: Distinguishing attribute name from varible name to make codes clear and definite

2014-08-21 Thread Denis McMahon
On Thu, 21 Aug 2014 22:13:32 +0800, luofeiyu wrote: I feel that self.x and x will be confused in the following codes. Then don't call them self.x and x, call them self.internal_x and param_x, or any other pair of different names. You are the one who chooses what names to use in your code. --

Re: Python vs C++

2014-08-21 Thread Grant Edwards
On 2014-08-21, David Palao dpalao.pyt...@gmail.com wrote: Why to use C++ instead of python? 1) C++ is the only language available for your platform, and for some reason you are unable to build Python from source. 2) You need money, and the only person willing to pay you says use C++

Re: Python vs C++

2014-08-21 Thread David Palao
Thank you for the interesting answers. Just a clarification. Actually for the scope of this question, I consider C and C++ quite different. At least when they are properly used (eg, you could use C++ as a better C, but this is not C++ in its full glory). In my opinion, if all that you want is

Re: Python vs C++

2014-08-21 Thread Michael Torrie
On 08/21/2014 07:39 AM, Burak Arslan wrote: For my day job, I chose Qt on C++ for a classic desktop app that needs to be deployed on Windows (among other platforms) with an installation package that is as small as possible. All I need to do deployment-wise is to create an NSIS script putting

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Steven D'Aprano
Ben Finney wrote: Everything You Need To Know ey...@outlook.com writes: I guess I have to agree and was mistaken, though vitriol I found unnecessary and unproductive! You've behaved obnoxiously, as has been pointed out. People can point out anything they like, it does not mean it is

Re: Python vs C++

2014-08-21 Thread Joseph Martinot-Lagarde
Le 21/08/2014 15:40, Chris Angelico a écrit : On Thu, Aug 21, 2014 at 10:54 PM, David Palao dpalao.pyt...@gmail.com wrote: Why to use C++ instead of python? This is, perhaps, a bit off-topic, but I really want to know the thoughts of experienced python programmers on it. No, it's a fair

Re: 'is not' or '!='

2014-08-21 Thread Thomas Rachel
Am 20.08.2014 13:17 schrieb Chris Angelico: That's true, but how easy is it to annotate a file with each line's author (or, at least, to figure out who wrote some particular line of code)? It's easy enough with 'git blame' or 'hg blame', and it wouldn't surprise me if bzr had a similar feature;

Re: 'is not' or '!='

2014-08-21 Thread Dan Stromberg
On Mon, Aug 18, 2014 at 1:35 PM, ElChino elch...@cnn.cn wrote: A newbie question to you; what is the difference between statements like: if x is not None: and if x != None: Without any context, which one should be preferred? IMHO, the latter is more readable. You've got some good answers.

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread luofeiyu
This man is crazy , he go on to send rubbish to waste our time ,i strongly strongly advise that python maillist administrator kick him off here. On 8/21/2014 9:25 PM, Everything You Need To Know wrote: On Thursday, 21 August 2014 01:06:37 UTC+9:30, Everything You Need To Know wrote:

Re: 'is not' or '!='

2014-08-21 Thread ElChino
Dan Stromberg drsali...@gmail.com wrote: You've got some good answers. I've counted around 210 messages in this thread!! I'd like to point out that this might make a good entry in a Python FAQ list... Ok. -- https://mail.python.org/mailman/listinfo/python-list

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Grant Edwards
On 2014-08-21, luofeiyu elearn2...@gmail.com wrote: This man is crazy, he go on to send rubbish to waste our time ,i strongly strongly advise that python maillist administrator kick him off here. He's not wasting my time -- I filter out all posts from Google Groups. What I do see is all of

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Terry Reedy
On 8/21/2014 9:37 AM, luofeiyu wrote: This man is crazy Such ad hominem slurs are a violation to the Python Community Code of Conduct. he go on to send rubbish to waste our time , Everyone should stop bashing each other, including you. What I see is people driving each other a bit

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Terry Reedy
On 8/21/2014 12:50 PM, Steven D'Aprano wrote: Ben Finney wrote: Everything You Need To Know ey...@outlook.com writes: I guess I have to agree and was mistaken, though vitriol I found unnecessary and unproductive! You've behaved obnoxiously, as has been pointed out. People can point out

Re: Distinguishing attribute name from varible name to make codes clear and definite

2014-08-21 Thread Ben Finney
luofeiyu elearn2...@gmail.com writes: I feel that self.x and x will be confused in the following codes. I don't see how. The examples you give have the two quite distinct in every case. exam=MyDescriptor(hallo) when class MyDescriptor initiate , the `hallo` was passed into x in

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Ben Finney
Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: Adam (Everything You Need To Know) has perhaps posted unwisely and clumsily, but obnoxiously? Obnoxious (noun): very offensive; hateful; odious; reprehensible. What did Adam do that was *obnoxious*? Here are some of the

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Mark Lawrence
On 21/08/2014 22:15, Ben Finney wrote: Steven D'Aprano steve+comp.lang.pyt...@pearwood.info writes: [War and Peace snipped] Frankly I think this entire debate has rapidly descended to the level of farce. Can we move on please? -- My fellow Pythonistas, ask not what our language can do

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Rustom Mody
On Friday, August 22, 2014 1:45:23 AM UTC+5:30, Terry Reedy wrote: On 8/21/2014 12:50 PM, Steven D'Aprano wrote: Ben Finney wrote: Everything You Need To Know writes: I guess I have to agree and was mistaken, though vitriol I found unnecessary and unproductive! You've behaved

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Rustom Mody
On Thursday, August 21, 2014 7:07:36 PM UTC+5:30, luofeiyu wrote: This man is crazy , he go on to send rubbish to waste our time ,i strongly strongly advise that python maillist administrator kick him off here. On 8/21/2014 9:25 PM, Everything You Need To Know wrote: On Thursday, 21

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Everything You Need To Know
On Friday, 22 August 2014 06:45:07 UTC+9:30, Ben Finney wrote: When the initial engagement is a continuous repeating of the same disrespectful behaviour, and it continues oblivious to requests to correct the mistakes, I think the welcome has worn out. We are not obligated to endure

Re: Python vs C++

2014-08-21 Thread Chris Angelico
On Fri, Aug 22, 2014 at 4:05 AM, Joseph Martinot-Lagarde joseph.martinot-laga...@m4x.org wrote: For information, Cython works with C++ now: http://docs.cython.org/src/userguide/wrapping_CPlusPlus.html. Now isn't that cool! Every time Cython gets discussed, I get a renewed desire to learn it.

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Dan Stromberg
Amusing. It works in hexadecimal too: numerator = 1 denominator = 0xffe001 shift = int(16 ** 30) print(hex(int(numerator * shift / denominator))) -- https://mail.python.org/mailman/listinfo/python-list

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Joel Goldstick
On Thu, Aug 21, 2014 at 7:10 PM, Everything You Need To Know ey...@outlook.com wrote: On Friday, 22 August 2014 06:45:07 UTC+9:30, Ben Finney wrote: When the initial engagement is a continuous repeating of the same disrespectful behaviour, and it continues oblivious to requests to correct

the output in reference of descriptor.

2014-08-21 Thread luofeiyu
class C(object): a = 'abc' def __getattribute__(self, *args, **kwargs): print(__getattribute__() is called) return object.__getattribute__(self, *args, **kwargs) def __getattr__(self, name): print(__getattr__() is called )

Re: what do you get with 1 divide by 998001, interesting results

2014-08-21 Thread Mark Lawrence
On 22/08/2014 00:28, Joel Goldstick wrote: I don't know the rules for announcements. https://mail.python.org/mailman/listinfo/python-announce-list also available through gmane.comp.python.announce -- My fellow Pythonistas, ask not what our language can do for you, ask what you can do for

Very basic question. How do I start again?

2014-08-21 Thread Seymore4Head
I want to give the computer 100 tries to guess a random number between 1 and 100 picked by the computer. For the moment I am always using 37 as the random pick. I want to change the pick to pick=random.randrange(1,100). The program works as expected until the computer gets a correct guess. I

Re: Very basic question. How do I start again?

2014-08-21 Thread Ben Finney
Seymore4Head Seymore4Head@Hotmail.invalid writes: The program works as expected until the computer gets a correct guess. I don't know what I should be doing to restart the program when pick=guess. There isn't a “restart the program” code we can give. But I think you need only something rather

Re: Very basic question. How do I start again?

2014-08-21 Thread Chris Angelico
On Fri, Aug 22, 2014 at 11:37 AM, Seymore4Head Seymore4Head@hotmail.invalid wrote: I want to give the computer 100 tries to guess a random number between 1 and 100 picked by the computer. Suggestion: Be up-front about this being a homework assignment. Most of us can tell anyway, and it's more

Re: Very basic question. How do I start again?

2014-08-21 Thread Seymore4Head
On Fri, 22 Aug 2014 11:55:58 +1000, Ben Finney ben+pyt...@benfinney.id.au wrote: Seymore4Head Seymore4Head@Hotmail.invalid writes: The program works as expected until the computer gets a correct guess. I don't know what I should be doing to restart the program when pick=guess. There isn't a

Re: Very basic question. How do I start again?

2014-08-21 Thread Chris Angelico
On Fri, Aug 22, 2014 at 12:13 PM, Seymore4Head Seymore4Head@hotmail.invalid wrote: I tried puttingbreak_stmt ::= break at the point where I want to start over:) ,but since there is no start over command, I was happy to end the program. I get invalid syntax so I tried

Re: Very basic question. How do I start again?

2014-08-21 Thread Seymore4Head
On Fri, 22 Aug 2014 11:58:00 +1000, Chris Angelico ros...@gmail.com wrote: On Fri, Aug 22, 2014 at 11:37 AM, Seymore4Head Seymore4Head@hotmail.invalid wrote: I want to give the computer 100 tries to guess a random number between 1 and 100 picked by the computer. Suggestion: Be up-front about

Re: Very basic question. How do I start again?

2014-08-21 Thread Steven D'Aprano
Seymore4Head wrote: I want to give the computer 100 tries to guess a random number between 1 and 100 picked by the computer. For the moment I am always using 37 as the random pick. I want to change the pick to pick=random.randrange(1,100). The program works as expected until the computer

Re: Very basic question. How do I start again?

2014-08-21 Thread Denis McMahon
On Thu, 21 Aug 2014 21:37:22 -0400, Seymore4Head wrote: I want to give the computer 100 tries to guess a random number between 1 and 100 picked by the computer. For the moment I am always using 37 as the random pick. I want to change the pick to pick=random.randrange(1,100). The program

Re: proposed syntax for multiline anony-functions (hopefully?)

2014-08-21 Thread alex23
On 21/08/2014 7:30 PM, icefap...@gmail.com wrote: On Thursday, August 21, 2014 2:27:08 AM UTC-7, Marko Rauhamaa wrote: In practice, your proposal would not make life easier for Python programmers. neither did the lambda, yours truly supposes? alex23 disagrees. alex23 finds the lambda

[issue1730136] tkFont.__eq__ gives type error

2014-08-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 2b379c092253 by Ned Deily in branch '2.7': Issue #1730136: Fix backported exception name. http://hg.python.org/cpython/rev/2b379c092253 -- ___ Python tracker rep...@bugs.python.org

[issue22194] access to cdecimal / libmpdec API

2014-08-21 Thread Stefan Behnel
Stefan Behnel added the comment: (for the record, the context is that we would like to support decimal objects efficiently in Numba) Same for Cython, although I guess we wouldn't do more than shipping the necessary declarations and (likely) also enable auto-coercion between the libmpdec

[issue22238] fractions.gcd results in infinite loop when nan or inf given as parameter.

2014-08-21 Thread Mark Dickinson
Changes by Mark Dickinson dicki...@gmail.com: -- resolution: - wont fix status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22238 ___

[issue22238] fractions.gcd results in infinite loop when nan or inf given as parameter.

2014-08-21 Thread Mark Dickinson
Mark Dickinson added the comment: I agreed with Raymond. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22238 ___ ___ Python-bugs-list mailing

[issue22217] Reprs for zipfile classes

2014-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Updated patch addresses Berker's comments. -- Added file: http://bugs.python.org/file36426/zipfile_reprs_2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22217

[issue21549] Add the members parameter for TarFile.list()

2014-08-21 Thread Roundup Robot
Roundup Robot added the comment: New changeset 5875c50e93fe by Serhiy Storchaka in branch 'default': Issue #21549: Added the members parameter to TarFile.list(). http://hg.python.org/cpython/rev/5875c50e93fe -- nosy: +python-dev ___ Python tracker

[issue21549] Add the members parameter for TarFile.list()

2014-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Thank you Berker for the review. -- resolution: - fixed stage: commit review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21549

[issue20797] zipfile.extractall should accept bytes path as parameter

2014-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also a discussion at Python-Dev: http://comments.gmane.org/gmane.comp.python.devel/149048 Looks as there are no need to add bytes path in such high-level API. In any case you can call os.fsdecode() on path argument. -- resolution: - rejected

[issue19997] imghdr.what doesn't accept bytes paths

2014-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: See also a discussion at Python-Dev: http://comments.gmane.org/gmane.comp.python.devel/149048 Looks as there are no need to add bytes path support in such high-level API. In any case you can call os.fsdecode() on path argument. -- status: open -

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2014-08-21 Thread Akira Li
New submission from Akira Li: from datetime import datetime, timezone dt = datetime.now(timezone.utc) fmt = '%Y-%m-%d %H:%M:%S.%f %Z%z' datetime.strptime(dt.strftime(fmt), fmt) Traceback (most recent call last): File stdin, line 1, in module File /cpython/Lib/_strptime.py,

[issue22016] Add a new 'surrogatereplace' output only error handler

2014-08-21 Thread Nick Coghlan
Nick Coghlan added the comment: Stephen Turnbull suggested on python-dev that this was a bad idea, and after reconsidering the current behaviour in Python 2, I realised that setting surrogateescape and letting the terminal deal with the consequences is exactly what we want. What confused me

[issue22194] access to cdecimal / libmpdec API

2014-08-21 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- nosy: +lemburg ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22194 ___ ___ Python-bugs-list mailing

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2014-08-21 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22241 ___ ___ Python-bugs-list

[issue22240] argparse support for python -m module in help

2014-08-21 Thread Brett Cannon
Changes by Brett Cannon br...@python.org: -- nosy: +ncoghlan ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22240 ___ ___ Python-bugs-list mailing

[issue22240] argparse support for python -m module in help

2014-08-21 Thread Nick Coghlan
Nick Coghlan added the comment: I suspect resolving this will actually need special casing on the argparse side - __main__.__spec__ will have the original details for __main__ when executed via -m of zipfile/directory execution. Things to check for: * __main__.__spec__ is not None indicates

[issue22241] strftime/strptime round trip fails even for UTC datetime object

2014-08-21 Thread Alexander Belopolsky
Alexander Belopolsky added the comment: This is a duplicate of #15873. -- components: +Extension Modules resolution: - duplicate status: open - closed superseder: - datetime: add ability to parse RFC 3339 dates and times type: behavior - enhancement versions: -Python 3.4

[issue22242] Doc fix in the Import section in language reference.

2014-08-21 Thread Jon Poler
New submission from Jon Poler: It looks like there might be a contradiction in the documentation of import in the language reference. In the loading subsection https://docs.python.org/dev/reference/import.html#loading, first bulleted list of the section, it specifies that if a loader fails,

[issue22243] Documentation on try statement incorrectly implies target of except clause can be any assignable expression

2014-08-21 Thread Michael Williamson
New submission from Michael Williamson: In the docs for the try statement [1], part of the grammar is: try1_stmt ::= try : suite (except [expression [as target]] : suite)+ [else : suite] [finally : suite] The `target` rule allows any assignable

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2014-08-21 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- assignee: exarkun - stage: patch review - needs patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4180 ___

[issue22240] argparse support for python -m module in help

2014-08-21 Thread Peter Otten
Changes by Peter Otten __pete...@web.de: -- nosy: +peter.otten ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22240 ___ ___ Python-bugs-list

[issue22240] argparse support for python -m module in help

2014-08-21 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- nosy: +BreamoreBoy, paul.j3 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22240 ___ ___

[issue22236] Do not use _default_root in Tkinter tests

2014-08-21 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: In updated patch the root windows is created only once per test class. -- Added file: http://bugs.python.org/file36428/tkinter_no_default_root_2.patch ___ Python tracker rep...@bugs.python.org

[issue21585] Run Tkinter tests with wantobjects=False

2014-08-21 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- dependencies: +Do not use _default_root in Tkinter tests ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21585 ___

[issue21308] PEP 466: backport ssl changes

2014-08-21 Thread Stefan Behnel
Stefan Behnel added the comment: The current implementation doesn't work with Unicode file paths. Try passing a Unicode string e.g. as cafile into context.load_verify_locations(). It calls PyString_AsEncodedObject() on it, which then fails with a PyErr_BadArgument() on the entry type check.

[issue21308] PEP 466: backport ssl changes

2014-08-21 Thread Alex Gaynor
Alex Gaynor added the comment: Thanks for the report, I've filed: http://bugs.python.org/issue22244 to track that issue. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21308 ___

[issue22244] load_verify_locations fails to handle unicode paths on Python 2

2014-08-21 Thread Alex Gaynor
New submission from Alex Gaynor: Details of the issue are here: http://bugs.python.org/msg225613 I'm not sure what the correct API to use is there, perhaps the encoding can be folded into the PyArg_ParseTupleAndKeywords() call. -- components: Extension Modules messages: 225614 nosy:

[issue22243] Documentation on try statement incorrectly implies target of except clause can be any assignable expression

2014-08-21 Thread Jayanth Koushik
Jayanth Koushik added the comment: Yes. Seems to be a documentation error. The full grammar specification [1] uses 'NAME' instead of 'target'. [1]: https://docs.python.org/3/reference/grammar.html -- nosy: +jayanthkoushik type: - enhancement ___

[issue21585] Run Tkinter tests with wantobjects=False

2014-08-21 Thread Lita Cho
Lita Cho added the comment: Hi Terry, I had no idea we were moving away from using test_main. So instead, of using support.run_unittest, we should import all the unittest from tkinter/test/ and wrap everything with that exec method, setting wantobjects=1 and again with wantobjects=0? Also,

[issue22242] Doc fix in the Import section in language reference.

2014-08-21 Thread Ned Deily
Changes by Ned Deily n...@acm.org: -- nosy: +eric.snow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22242 ___ ___ Python-bugs-list mailing list

[issue22234] urllib.parse.urlparse accepts any falsy value as an url

2014-08-21 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22234 ___ ___ Python-bugs-list

[issue22239] asyncio: nested event loop

2014-08-21 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue22239 ___ ___ Python-bugs-list

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2014-08-21 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch implementing an alternate approach, with a version number added in the registry dicts. It also reuses Tres' test cases. Removing 2.7 because at this point we probably don't want to add non-minimal changes there (outside of the ssl module, that

[issue4180] warnings.simplefilter(always) does not make warnings always show up

2014-08-21 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue4180 ___ ___

  1   2   >