Re: recursive function: use a global or pass a parameter?

2015-01-17 Thread Steven D'Aprano
Tim wrote: I have this type of situation and wonder if I should use a global variable outside the recursive function instead of passing the updated parameter through. To a first approximation, the answer to: I have a X, should I use a global variable or a parameter? is *always* use a

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Steven D'Aprano
Gregory Ewing wrote: Marko Rauhamaa wrote: Gregory Ewing greg.ew...@canterbury.ac.nz: If those are 24-bit RGB pixels, you could encode 3 characters in each pixel. Not since Python3. Characters are Unicode now so you'll need to dedicate a pixel for each character. Depends on which

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Steven D'Aprano
Gregory Ewing wrote: We're really quite spoiled in Python-land. It's easy to forget just how spoiled we are until you go back and try to do something in one of the more primitive languages... Every time I think I would like to learn a new language, I quite quickly run into some obvious

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Jussi Piitulainen
Steven D'Aprano writes: Ah, wait, I forgot Ruby's brilliant feature that whitespace *between* expressions is significant: [steve@ando ~]$ cat ~/coding/ruby/ws-example.rb #!/usr/bin/ruby def a(x=4) x+2 end b = 1 print a + b = , (a + b), \n print a+b = , (a+b), \n print a+ b

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Marko Rauhamaa
Jussi Piitulainen jpiit...@ling.helsinki.fi: a+ b = 7 # a() + b a +b = 3 # a(+b) = a(b) = a(1) = 1 + 2 I'm not quite fond of such surprise in programming language syntax. Yes, whoever came up with the idea of whitespace having syntactic significance! Marko --

EuroPython 2015: Landing in Bilbao

2015-01-17 Thread M.-A. Lemburg
After a creative and inspiring Friday afternoon, we are pleased to announce our EuroPython 2015 landing page: http://ep2015.europython.eu/ This will be the URL for EuroPython 2015 - definitely worth a bookmark, we think :-) Enjoy, -— EuroPython Society (EPS)

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Jussi Piitulainen
Marko Rauhamaa writes: Jussi Piitulainen: a+ b = 7 # a() + b a +b = 3 # a(+b) = a(b) = a(1) = 1 + 2 I'm not quite fond of such surprise in programming language syntax. Yes, whoever came up with the idea of whitespace having syntactic significance! How far do you want to

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Skip Montanaro
On Sat, Jan 17, 2015 at 5:59 AM, Jussi Piitulainen jpiit...@ling.helsinki.fi wrote: How far do you want to go? Is a b + c the same as a(b) + c or the same as a(b + c)? I think there is only one practical interpretation, the one that all shells I'm familiar with have adopted: a(b, +, c)

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Marko Rauhamaa
Jussi Piitulainen jpiit...@ling.helsinki.fi: Marko Rauhamaa writes: Yes, whoever came up with the idea of whitespace having syntactic significance! How far do you want to go? [...] I prefer parentheses. They are not nearly as fragile. *cough* braces *cough* Seriously, though, I hate the

Re: Comparisons and sorting of a numeric class....

2015-01-17 Thread Steven D'Aprano
Andrew, sorry for the delay in responding. Your response has been extremely long, so for the interest of brevity I've tried to trim things down to the most pertinent points. Andrew Robinson wrote: [...] So -- From my perspective, Guido making Python go from an open ended and permissive use of

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Steven D'Aprano
Marko Rauhamaa wrote: Jussi Piitulainen jpiit...@ling.helsinki.fi: a+ b = 7 # a() + b a +b = 3 # a(+b) = a(b) = a(1) = 1 + 2 I'm not quite fond of such surprise in programming language syntax. Yes, whoever came up with the idea of whitespace having syntactic significance! Yes,

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Steven D'Aprano
Jussi Piitulainen wrote: I've only seen small amounts of Ruby code on the net. The only way I can make some sense of that is if it gets analyzed as follows, using parentheses for calls: a + b = 7 # a() + b = a(4) + b = 4 + 2 + 1 a+b = 7 # a() + b a+ b = 7 # a() + b a +b = 3 #

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Jussi Piitulainen
Marko Rauhamaa writes: Seriously, though, I hate the optional semicolon rules of JavaScript and Go. I dread the day when GvR gets it in his head to allow this syntax in Python: average_drop_rate = cumulative_drop_count / observation_period (although, it could be defined

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Jussi Piitulainen
Skip Montanaro writes: On Sat, Jan 17, 2015 at 5:59 AM, Jussi Piitulainen wrote: How far do you want to go? Is a b + c the same as a(b) + c or the same as a(b + c)? I think there is only one practical interpretation, the one that all shells I'm familiar with have adopted: a(b, +,

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Chris Angelico
On Sat, Jan 17, 2015 at 9:49 PM, Jussi Piitulainen jpiit...@ling.helsinki.fi wrote: I've only seen small amounts of Ruby code on the net. The only way I can make some sense of that is if it gets analyzed as follows, using parentheses for calls: a + b = 7 # a() + b = a(4) + b = 4 + 2 + 1

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Danilo Coccia
Il 17/01/2015 12.07, Marko Rauhamaa ha scritto: Jussi Piitulainen jpiit...@ling.helsinki.fi: a+ b = 7 # a() + b a +b = 3 # a(+b) = a(b) = a(1) = 1 + 2 I'm not quite fond of such surprise in programming language syntax. Yes, whoever came up with the idea of whitespace having

numpy.allclose()

2015-01-17 Thread Steven D'Aprano
Can anyone explain the rationale for numpy's allclose() semantics? help(allclose) says: allclose(a, b, rtol=1e-05, atol=1e-08) Returns True if two arrays are element-wise equal within a tolerance. The tolerance values are positive, typically very small numbers. The relative

Re: Hello World

2015-01-17 Thread Albert van der Horst
In article mailman.17471.1420721626.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: SNIP But sure. If you want to cut out complication, dispense with user accounts altogether and run everything as root. That's WAY simpler! I didn't except this strawman argument from you. Of

Re: Hello World

2015-01-17 Thread Chris Angelico
On Sun, Jan 18, 2015 at 1:51 AM, Albert van der Horst alb...@spenarnc.xs4all.nl wrote: In article mailman.17471.1420721626.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: SNIP But sure. If you want to cut out complication, dispense with user accounts altogether and run

Re: Hello World

2015-01-17 Thread Albert van der Horst
In article mailman.17481.1420737102.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Fri, Jan 9, 2015 at 4:02 AM, Steve Hayes hayes...@telkomsa.net wrote: On 08 Jan 2015 12:43:33 GMT, alb...@spenarnc.xs4all.nl (Albert van der Horst) wrote: I don't trust sudo because it

Re: recursive function: use a global or pass a parameter?

2015-01-17 Thread Roy Smith
In article 54ba3654$0$13008$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Good reasons for using global variables are few and far between. Just about the only good reason for using global variables that I can think of is if you have one or

Re: Hello World

2015-01-17 Thread cl
Chris Angelico ros...@gmail.com wrote: On Sun, Jan 18, 2015 at 1:51 AM, Albert van der Horst alb...@spenarnc.xs4all.nl wrote: In article mailman.17471.1420721626.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: SNIP But sure. If you want to cut out complication,

Re: Hello World

2015-01-17 Thread Michael Torrie
On 01/17/2015 07:51 AM, Albert van der Horst wrote: In article mailman.17471.1420721626.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: SNIP But sure. If you want to cut out complication, dispense with user accounts altogether and run everything as root. That's WAY

Re: Why do the URLs of posts here change?

2015-01-17 Thread Albert van der Horst
In article mailman.17551.1420862015.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: On Sat, Jan 10, 2015 at 2:21 PM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Skip Montanaro wrote: The way this is done, is that the message is removed from the underlying mbox file,

Re: Hello World

2015-01-17 Thread cl
Michael Torrie torr...@gmail.com wrote: On 01/17/2015 07:51 AM, Albert van der Horst wrote: In article mailman.17471.1420721626.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: SNIP But sure. If you want to cut out complication, dispense with user accounts

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Roy Smith
In article 54ba39e0$0$13008$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Every time I think I would like to learn a new language, I quite quickly run into some obvious feature that Python has but the newer language lacks, and I think bugger

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Roy Smith
In article mailman.17811.1421497179.18130.python-l...@python.org, Skip Montanaro skip.montan...@gmail.com wrote: On Sat, Jan 17, 2015 at 5:59 AM, Jussi Piitulainen jpiit...@ling.helsinki.fi wrote: How far do you want to go? Is a b + c the same as a(b) + c or the same as a(b + c)? I

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Roy Smith
In article 54ba5a25$0$12991$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Whitespace is significant in nearly all programming languages, and so it should be. Whitespace separates tokens, and lines, and is a natural way of writing (at least for

Re: recursive function: use a global or pass a parameter?

2015-01-17 Thread Albert van der Horst
In article 5e4ccec6-7a00-467d-8cf6-258ab0421...@googlegroups.com, Tim jtim.arn...@gmail.com wrote: I have this type of situation and wonder if I should use a global variable outside the recursive function instead of passing the updated parameter through. I want to get a union of all the values

EuroPython 2015: Landing in Bilbao

2015-01-17 Thread M.-A. Lemburg
After a creative and inspiring Friday afternoon, we are pleased to announce our EuroPython 2015 landing page: http://ep2015.europython.eu/ This will be the URL for EuroPython 2015 - definitely worth a bookmark, we think :-) Enjoy, -— EuroPython Society (EPS)

Re: Hello World

2015-01-17 Thread Mark Lawrence
On 17/01/2015 16:47, c...@isbd.net wrote: Michael Torrie torr...@gmail.com wrote: On 01/17/2015 07:51 AM, Albert van der Horst wrote: In article mailman.17471.1420721626.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: SNIP But sure. If you want to cut out complication,

[issue21817] `concurrent.futures.ProcessPoolExecutor` swallows tracebacks

2015-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset a36b402b099b by Antoine Pitrou in branch 'default': Issue #21817: When an exception is raised in a task submitted to a ProcessPoolExecutor, the remote traceback is now displayed in the parent process. https://hg.python.org/cpython/rev/a36b402b099b

[issue21862] cProfile command-line should accept -m module_name as an alternative to script path

2015-01-17 Thread Mayank Tripathi
Mayank Tripathi added the comment: Now allows parameters after the -m option. -- nosy: +oquanox Added file: http://bugs.python.org/file37749/cProfile_module_option.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21862

[issue23258] Cannot Install Python 3.4.2 on Windows 7 64 bit / screen print attached

2015-01-17 Thread Steve Dower
Steve Dower added the comment: You can close those applications, or ignore the message and continue, just like the dialog says (if you ignore it, you may need to reboot for installation to complete). You could also try doing a Just for Me installation. Python is not trying to update those

[issue23253] Delay-load ShellExecute

2015-01-17 Thread Tim Golden
Tim Golden added the comment: I'm +0.75. I think the idea's fine in principle and the patch (by inspection) seems to do the right things. My only concerns are: that posixmodule.c becomes even longer and more involved; and that the benefit might not quite be great enough to justify the added

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Gregory Ewing
Jussi Piitulainen wrote: I prefer parentheses. They are not nearly as fragile. So do I, but the other day I had occasion to write a small piece of VBScript, and I discovered that it actually *forbids* parens around the arguments to procedure calls (but not function calls). Fortunately, it

Re: Hello World

2015-01-17 Thread Albert van der Horst
In article h9gqob-c3e@esprimo.zbmc.eu, c...@isbd.net wrote: Michael Torrie torr...@gmail.com wrote: On 01/17/2015 07:51 AM, Albert van der Horst wrote: In article mailman.17471.1420721626.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote: SNIP But sure. If you

[issue23248] Update ssl data

2015-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: New patch merges in the old codes. -- Added file: http://bugs.python.org/file37748/update_ssl_data2.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23248

[issue23199] libpython27.a in amd64 release is 32-bit

2015-01-17 Thread Steve Dower
Steve Dower added the comment: So I've grabbed gendef and dlltool from the latest mingw-w64 and will look at using those in the future for both 2.7 and 3.5. According to objdump, I can use these to create file format pe-i386 and pe-x86-64 with the same tools. Are these the correct formats for

[issue18022] Inconsistency between quopri.decodestring() and email.quoprimime.decode()

2015-01-17 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue18022 ___ ___ Python-bugs-list

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread alister
On Sat, 17 Jan 2015 21:33:19 +1100, Steven D'Aprano wrote: Gregory Ewing wrote: Marko Rauhamaa wrote: Gregory Ewing greg.ew...@canterbury.ac.nz: If those are 24-bit RGB pixels, you could encode 3 characters in each pixel. Not since Python3. Characters are Unicode now so you'll need to

[issue23251] mention in time.sleep() docs that it does not block other Python threads

2015-01-17 Thread R. David Murray
R. David Murray added the comment: Yes, on consideration I agree with Antoine. That last sentence should be deleted. Otherwise we'd need to mention that the gil was released every place that the gil was released, which would be very redundant. The general rule is that anything that blocks

[issue20284] patch to implement PEP 461 (%-interpolation for bytes)

2015-01-17 Thread Ethan Furman
Ethan Furman added the comment: Better patch, along the lines of my original thought: - byarrayformat converts bytearray to bytes - calls bytesformat (now _PyBytes_Format) to do the heavy lifting - uses PyByteArray_FromObject to tranform back to bytearray Now working on in-place format.

Re: numpy.allclose()

2015-01-17 Thread Ian Kelly
On Sat, Jan 17, 2015 at 7:26 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I don't understand why they add the error tolerances together. I can understand taking the minimum, or the maximum: The usual idea is that the tolerance is calculated as a relative value, but an

Re: Hello World

2015-01-17 Thread Michael Ströder
alb...@spenarnc.xs4all.nl (Albert van der Horst) wrote: In article h9gqob-c3e@esprimo.zbmc.eu, c...@isbd.net wrote: Michael Torrie torr...@gmail.com wrote: On 01/17/2015 07:51 AM, Albert van der Horst wrote: In article mailman.17471.1420721626.18130.python-l...@python.org, Chris Angelico

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Grant Edwards
On 2015-01-17, Roy Smith r...@panix.com wrote: In article 54ba39e0$0$13008$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Every time I think I would like to learn a new language, I quite quickly run into some obvious feature that Python has

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Dan Sommers
On Sat, 17 Jan 2015 18:44:42 +, Grant Edwards wrote: ... somebody who only knows how to write C++ [though he can do it in several different languages]. +1 QOTW (brilliant phrases in other threads are off topic and are disqualified) I have also suffered through such maintenance, but I have

Re: recursive function: use a global or pass a parameter?

2015-01-17 Thread Chris Angelico
On Sun, Jan 18, 2015 at 4:30 AM, Albert van der Horst alb...@spenarnc.xs4all.nl wrote: The proper technique is make the global local to the normal subroutine, then make the subroutine with those parameters you don't want to see also local to that subroutine. E.g. def fib(n): ' return

[issue23248] Update ssl data

2015-01-17 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- versions: +Python 2.7, Python 3.4 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23248 ___ ___

Re: recursive function: use a global or pass a parameter?

2015-01-17 Thread Gregory Ewing
Roy Smith wrote: I will commonly put something like: import logging logger = logging.getLogger(logger-name-for-my-module) But that's not really a global variable, it's a global constant. There's nothing wrong with those, we use them all the time -- classes, functions, etc. If you were to

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-17 Thread Martin Panter
Changes by Martin Panter vadmium...@gmail.com: -- nosy: +vadmium ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23255 ___ ___ Python-bugs-list

[issue23259] Remove dummy reuse optimization from sets

2015-01-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: This can be a common case in following algorithm (mesh optimization): while elems: elem = elems.pop() changed = optimize(elem) if changed: elems.update(neighbors(elem)) -- nosy: +serhiy.storchaka

[issue22919] Update PCBuild for VS 2015

2015-01-17 Thread Steve Dower
Steve Dower added the comment: Closing again, as Victor's issue was resolved (VS 2010 SP1 is needed, and I'm updating the devguide to specify that on #23257). -- resolution: - fixed status: open - closed ___ Python tracker rep...@bugs.python.org

[issue23239] SSL match_hostname does not accept IP Address

2015-01-17 Thread Antoine Pitrou
Changes by Antoine Pitrou pit...@free.fr: -- keywords: +patch Added file: http://bugs.python.org/file37746/ip_certs.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23239 ___

[issue21817] `concurrent.futures.ProcessPoolExecutor` swallows tracebacks

2015-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thank you very much. Everything is now committed. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21817

[issue23258] Cannot Install Python 3.4.2 on Windows 7 64 bit / screen print attached

2015-01-17 Thread steve
New submission from steve: I down loaded and tried to install version 3.4.2 on a Windows 7 64 bit system. 2 error messages came up saying that I had to stop two Windows systems tasks to allow the install to complete. Please see the attached screen print for details. What can I do to

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread alister
On Sat, 17 Jan 2015 19:08:21 +, Dan Sommers wrote: On Sat, 17 Jan 2015 18:44:42 +, Grant Edwards wrote: ... somebody who only knows how to write C++ [though he can do it in several different languages]. +1 QOTW (brilliant phrases in other threads are off topic and are

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Gregory Ewing
Steven D'Aprano wrote: def a(x=4) x+2 end a + b = 7 a+b = 7 a+ b = 7 a +b = 3 A shiny new penny for any non-Ruby coder who can explain that! Seems pretty obvious to me: the Ruby interpreter is infested with demons. DWIM = Demonic Whim Infers Meaning -- Greg --

[issue23253] Delay-load ShellExecute

2015-01-17 Thread Steve Dower
Steve Dower added the comment: Yeah, I hate touching posixmodule.c for the same reason. It'd be nice to split it up into separate platform files, but nobody is volunteering for that. If you focus on the performance, then yeah, this change probably isn't worth it. OTOH, the number of Windows

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Gregory Ewing
Chris Angelico wrote: Every once in a while, someone looks at Py2's print statement and Py3's print function and says, why not allow function calls without parentheses. This right here is why not. There's also the fact that the parens are needed to distinguish between calling a function and

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Chris Angelico
On Sun, Jan 18, 2015 at 8:56 AM, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: Ruby doesn't have that problem because it doesn't have functions, only methods, and the only thing you can do with a method in Ruby is call it. So functions aren't first-class objects in Ruby? Bleh. I've become

Re: Why do the URLs of posts here change?

2015-01-17 Thread Gregory Ewing
Albert van der Horst wrote: Knowing that the source is an mbox file, I don't need to follow that link to conclude that one is not very inventive. It suffices to replace the content of the message by a repetition of '\n'. Editing the mbox file isn't the problem. From what I gather, telling

[issue23260] Update Windows installer

2015-01-17 Thread Mark Lawrence
Changes by Mark Lawrence breamore...@yahoo.co.uk: -- nosy: +BreamoreBoy ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23260 ___ ___

Re: lambdak: multi-line lambda implementation in native Python

2015-01-17 Thread Grant Edwards
On 2015-01-16, Gregory Ewing greg.ew...@canterbury.ac.nz wrote: We're really quite spoiled in Python-land. It's easy to forget just *how* spoiled we are until you go back and try to do something in one of the more primitive languages... I had to do some work in PHP yesterday -- fixing up

[issue23239] SSL match_hostname does not accept IP Address

2015-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Here is a patch. -- stage: needs patch - patch review ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23239 ___

[issue23259] Remove dummy reuse optimization from sets

2015-01-17 Thread Raymond Hettinger
New submission from Raymond Hettinger: The lookkey routines in Object/setobject.c have logic to track the first open freeslot in a search. The benefit is that new keys can reuse previously deleted slots. The benefit only occurs in cases where keys are added, then some removed, and then

Re: recursive function: use a global or pass a parameter?

2015-01-17 Thread Gregory Ewing
Yawar Amin wrote: Cool ... but it looks like this can still potentially hit the max recursion limit? It depends on the nature of your data. If the data is a tree, it's very unlikely you'll reach the recursion limit unless the tree is massively unbalanced. If there's a chance of that, or if

[issue23259] Remove dummy reuse optimization from sets

2015-01-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: Even in the mesh algorithm, we let resizing periodically clean-up the dummies. The idea is to not pay the freeslot tracking cost on every lookup and instead only clean-up periodically (which would likely give better performance for the mesh algorithm as

[issue23260] Update Windows installer

2015-01-17 Thread Steve Dower
Steve Dower added the comment: Patch. I'm also revising Doc/using/windows.rst, but I don't want to delay the initial reviews. I don't think this is perfect, but it works well enough for the first alpha (scheduled for 8 Feb), so I want to get it in and stabilised now rather than at the last

[issue23260] Update Windows installer

2015-01-17 Thread Steve Dower
Changes by Steve Dower steve.do...@microsoft.com: Added file: http://bugs.python.org/file37752/README.txt ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23260 ___

Re: Hello World

2015-01-17 Thread Steven D'Aprano
Mark Lawrence wrote: Bah humbug, this has reminded me of doing secure work whereby each individual had two passwords, both of which had to be changed every thirty days, and rules were enforced so you couldn't just increment the number at the end of a word or similar. I hate and despise

[issue23260] Update Windows installer

2015-01-17 Thread Steve Dower
New submission from Steve Dower: Updating the installer for better security and robustness. Large patch coming soon (just getting an issue number to put in NEWS). -- assignee: steve.dower components: Windows messages: 234203 nosy: steve.dower, tim.golden, zach.ware priority: release

[issue23231] Fix codecs.iterencode/decode() by allowing data parameter to be omitted

2015-01-17 Thread Martin Panter
Martin Panter added the comment: Another idea that doesn’t involve changing the incremental codec APIs is kind of described in https://bugs.python.org/issue7475#msg145986: to add format parameters to iterencode() and iterdecode(), which would allow it to determine the right data type to

[issue23260] Update Windows installer

2015-01-17 Thread Steve Dower
Steve Dower added the comment: As I expected, shortly after posting this I find a significant issue with the way the installer will work. Expect a revised patch soon :) -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23260

Re: numpy.allclose()

2015-01-17 Thread Steven D'Aprano
Ian Kelly wrote: On Sat, Jan 17, 2015 at 7:26 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: I don't understand why they add the error tolerances together. I can understand taking the minimum, or the maximum: The usual idea is that the tolerance is calculated as a relative

[issue23180] Rename IDLE's Windows menu item to Window

2015-01-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: I cannot currently test or commit a patch. So go ahead. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23180 ___

[issue23180] Rename IDLE's Windows menu item to Window

2015-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 9a451aaa8ddb by Ned Deily in branch '2.7': Issue #23180: Rename IDLE Windows menu item to Window. https://hg.python.org/cpython/rev/9a451aaa8ddb New changeset 8c0e5b507794 by Ned Deily in branch '3.4': Issue #23180: Rename IDLE Windows menu item to

[issue20121] quopri_codec newline handling

2015-01-17 Thread Martin Panter
Martin Panter added the comment: Here is a patch that clarifies in the documentation and test suite how newlines work in the “quopri” and “binascii” modules. It also fixes the native Python implementation to support CRLFs. * \n is used by default (e.g. for soft line breaks if the input has no

Re: Hello World

2015-01-17 Thread Devin Jeanpierre
Sorry for necro. On Sat, Dec 20, 2014 at 10:44 PM, Chris Angelico ros...@gmail.com wrote: On Sun, Dec 21, 2014 at 5:31 PM, Terry Reedy tjre...@udel.edu wrote: Just to be clear, writing to sys.stdout works fine in Idle. import sys; sys.stdout.write('hello ') hello #2.7 In 3.4, the number of

Re: Hello World

2015-01-17 Thread Michael Torrie
On 01/17/2015 11:47 AM, Michael Ströder wrote: sudo makes administrators careless, lazy and it is not simple at all. Admins must have separate accounts with separate credentials for administrative work and must be careful when using an administrative account. Right. This is not a bad idea

Re: Hello World

2015-01-17 Thread Steven D'Aprano
Albert van der Horst wrote: In article h9gqob-c3e@esprimo.zbmc.eu, c...@isbd.net wrote: Michael Torrie torr...@gmail.com wrote: On 01/17/2015 07:51 AM, Albert van der Horst wrote: In article mailman.17471.1420721626.18130.python-l...@python.org, Chris Angelico ros...@gmail.com wrote:

Re: Hello World

2015-01-17 Thread Steven D'Aprano
Roy Smith wrote: In article 54bb1c83$0$12979$c3e8da3$54964...@news.astraweb.com, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: Even that doesn't protect you, because your security is controlled by websites and banks etc. with stupid security policies. E.g. I am forced to

[issue23180] Rename IDLE's Windows menu item to Window

2015-01-17 Thread Ned Deily
Ned Deily added the comment: Thanks for the patches, Al. Pushed for release in 2.7.10, 3.4.3, and 3.5.0. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org

[issue23255] SimpleHTTPRequestHandler refactor for more extensible usage.

2015-01-17 Thread Ent
Ent added the comment: @vadmium: My Mistake. It should read file path not file object. (500 error when submitting to review page.) Renaming get_html_or_dir_path to get_path_or_dir for accurate description. Also renaming copyfile to more pythonic copy_file. -- Added file:

Re: Hello World

2015-01-17 Thread Chris Angelico
On Sun, Jan 18, 2015 at 2:50 PM, Tim Chase python.l...@tim.thechases.com wrote: You think that's bad, one million Google Authenticator 2-factor verification codes were leaked: https://twitter.com/paulmutton/status/509991378647277568 Those hackers are a wily bunch. ;-)

[issue23211] test.test_logging.SMTPHandlerTest failing on Snow Leopard

2015-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 90b664532d1c by Ned Deily in branch '3.4': Issue #23211: Workaround test_logging failure on some OS X 10.6 systems: https://hg.python.org/cpython/rev/90b664532d1c New changeset e3dfe942697e by Ned Deily in branch 'default': Issue #23211: merge from

[issue23211] test.test_logging.SMTPHandlerTest failing on Snow Leopard

2015-01-17 Thread Ned Deily
Ned Deily added the comment: I *thought* I had tested 3.4 before; sorry about that! -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23211 ___ ___

[issue23211] test.test_logging.SMTPHandlerTest failing on Snow Leopard

2015-01-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 65ac2b992673 by Ned Deily in branch '3.4': Issue #23211: Fix patch for 3.4 differences. https://hg.python.org/cpython/rev/65ac2b992673 New changeset 2d71d0f954fb by Ned Deily in branch 'default': Issue #23211: null merge

Re: Hello World

2015-01-17 Thread Chris Angelico
On Sun, Jan 18, 2015 at 10:46 AM, Steven D'Aprano steve+comp.lang.pyt...@pearwood.info wrote: The merely poor reason given by the more thoughtful sys admins is, if the password hashes get stolen, the hacker has a maximum of N days (and possibly less) to crack the hashes and recover the

[issue23259] Remove dummy reuse optimization from sets

2015-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: In short, it looks like the freeslot idea was a net negative -- it optimized an uncommon case at the cost of slowing and complicating the common cases. Do you have a benchmark showing the slowing down? -- nosy: +pitrou

[issue23261] Clean-up set.pop() search finger logic

2015-01-17 Thread Raymond Hettinger
New submission from Raymond Hettinger: The existing search finger is stored in a hackish way (using the hash field of entry zero in the hash table). Replace this with normal coding techniques (saving the field in the set object). Cost one extra field in the set object. Benefit, remove an

[issue23211] test.test_logging.SMTPHandlerTest failing on Snow Leopard

2015-01-17 Thread Ned Deily
Ned Deily added the comment: OK, the workaround is applied for 3.4.3 and 3.5.0. -- resolution: - fixed stage: patch review - resolved status: open - closed ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23211

[issue23259] Remove dummy reuse optimization from sets

2015-01-17 Thread Raymond Hettinger
Raymond Hettinger added the comment: I've observed the generated assembly has fewer instructions on the critical path and that a register was freed-up. That's enough for me in this case (it's too easy to get trapped in local minimums in timing small changes like this). Do either of you have

[issue23180] Rename IDLE's Windows menu item to Window

2015-01-17 Thread Ned Deily
Ned Deily added the comment: LGTM. Terry, should I apply them? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue23180 ___ ___ Python-bugs-list

[issue23260] Update Windows installer

2015-01-17 Thread Steve Dower
Steve Dower added the comment: New patch with some changes to how optional debug symbols and binaries are handled. (I misunderstood how a particular WiX feature worked...) -- Added file: http://bugs.python.org/file37754/23260_2.diff ___ Python

[issue6671] webbrowser doesn't respect xfce default browser

2015-01-17 Thread Stephan Sokolow
Changes by Stephan Sokolow bugs_python_org.zen.ssoko...@spamgourmet.com: -- nosy: +ssokolow ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue6671 ___

[issue23262] webbrowser module broken with Firefox 36+

2015-01-17 Thread Stephan Sokolow
New submission from Stephan Sokolow: As of Firefox 36 (currently in beta channel), the -remote option has been removed. https://www.mozilla.org/en-US/firefox/36.0a2/auroranotes/ https://www.mozilla.org/en-US/firefox/36.0beta/releasenotes/ As such, attempting to open http://www.example.com/

Re: Hello World

2015-01-17 Thread Tim Chase
On 2015-01-17 22:18, Roy Smith wrote: Tell me about it. I have an E-Trade ATM card. When I first got it, I set it up with a 6 digit PIN. I was shocked to discover some time later that it actually only looks at the first 4 digits. And, no, I'm not talking *characters*, I'm talking *digits*.

[issue23263] Python 3 gives misleading errors when validating unicode identifiers

2015-01-17 Thread Matt Bachmann
New submission from Matt Bachmann: PEP 3131 changed the definition of valid identifiers to match this pattern XID_Start XID_Continue* . Currently if you have an invalid character in an identifier you get this error ☺ = 4 SyntaxError: invalid character in identifier This is fine in most

[issue23259] Remove dummy reuse optimization from sets

2015-01-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fewer instructions doesn't necessarily translate into better performance. The bottleneck in superscalar, pipelined processors is often the data dependency path between instructions. Adding instructions may as well not slow anything down, if those instructions

  1   2   >