Re: How does a dictionary work exactly?

2015-07-17 Thread Ned Batchelder
On Thursday, July 16, 2015 at 2:59:02 PM UTC-4, Skip Montanaro wrote: On Thu, Jul 16, 2015 at 1:36 PM, yoursurrogate...@gmail.com yoursurrogate...@gmail.com wrote: If I understand correctly, lookup would not be a constant, yes? On the contrary, that's what you desire, nearly constant time

[issue24654] PEP 492 - example benchmark doesn't work (TypeError)

2015-07-17 Thread Marcin Szewczyk
New submission from Marcin Szewczyk: Using benchmark from the section https://www.python.org/dev/peps/pep-0492/#async-await raises: Traceback (most recent call last): File ./bench.py, line 28, in module timeit(abinary, 19, 30) File ./bench.py, line 23, in timeit list(gen(depth))

Re: ANN: eGenix PyRun - One file Python Runtime 2.1.0

2015-07-17 Thread M.-A. Lemburg
Hi Alex, On 17.07.2015 00:58, Alex wrote: Do you have Python 2.7 64bit versions available for Solaris (10/11) x86/SPARC, AIX, and HP-UX IA/RISC? I've had the displeasure of having to install 64bit Python on Solaris and AIX and it's an experience I would not recommend even though OpenCSW and

Re: Possibly Pythonic Tail Call Optimization (TCO/TRE)

2015-07-17 Thread Chris Angelico
On Fri, Jul 17, 2015 at 9:43 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: On 07/17/2015 01:05 PM, Chris Angelico wrote: On Fri, Jul 17, 2015 at 8:48 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Just wondering, are traceback records of generators available? They are if an

Re: Possibly Pythonic Tail Call Optimization (TCO/TRE)

2015-07-17 Thread Antoon Pardon
On 07/17/2015 01:05 PM, Chris Angelico wrote: On Fri, Jul 17, 2015 at 8:48 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Just wondering, are traceback records of generators available? They are if an exception is raised in the generator itself, but what if an exception is raised in the

Re: Possibly Pythonic Tail Call Optimization (TCO/TRE)

2015-07-17 Thread Antoon Pardon
On 07/17/2015 01:49 PM, Chris Angelico wrote: On Fri, Jul 17, 2015 at 9:43 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Sure, but in this case, the generator is still active. The Runtime would be able to jump to and somehow activates it's stack record for the next value. So why

Re: ANN: eGenix PyRun - One file Python Runtime 2.1.0

2015-07-17 Thread Alex
They don't offer any free versions for those systems and their licenses are quite expensive. On Fri, Jul 17, 2015 at 2:26 AM, Laura Creighton l...@openend.se wrote: I think Activestate makes a Python 2.y for Solaris. http://www.activestate.com/activepython I've never used it. Laura In a

[issue24644] --help for runnable stdlib modules

2015-07-17 Thread Ezio Melotti
Ezio Melotti added the comment: writing tests for the CLI are a pain too It shouldn't be particularly difficult to do it using script_helper.assert_python_{ok|failure}(), even though you could also check the argument /parsing/ separately without having to launch a subprocess. --

[issue24635] test_typing is flaky

2015-07-17 Thread Guido van Rossum
Guido van Rossum added the comment: You can list me as the expert for typing.py, since I wrote it. :-) (However, until mid August I have limited availability since I'm on vacation.) This looks indeed like a test order dependency. The three failures are all basic failures where an empty set,

[issue24644] --help for runnable stdlib modules

2015-07-17 Thread R. David Murray
R. David Murray added the comment: Yes, that's pretty much why things are in the state they are in ;) Still, opening individual issues for help problems with individual modules is the way to go, as you did (thank you). -- ___ Python tracker

[issue23792] help crash leaves terminal in echo off mode

2015-07-17 Thread R. David Murray
R. David Murray added the comment: Well, not exactly. While the title was inaccurate, the real problem was the management of the subprocess, not what mode the terminal was in. -- ___ Python tracker rep...@bugs.python.org

Re: Possibly Pythonic Tail Call Optimization (TCO/TRE)

2015-07-17 Thread Chris Angelico
On Fri, Jul 17, 2015 at 10:54 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: On 07/17/2015 01:49 PM, Chris Angelico wrote: On Fri, Jul 17, 2015 at 9:43 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Sure, but in this case, the generator is still active. The Runtime would be

[issue24621] zipfile.BadZipFile: File is not a zip file

2015-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: not_working.zip has 85972 extra null bytes at the end. This doesn't look as common ZIP file, and adding support such files can be considered as new feature (if it is worth to do at all). How did you get this file Yasar? -- type: behavior -

Re: Fwd: PROBLEM IN importing PIL

2015-07-17 Thread Laura Creighton
In a message of Fri, 17 Jul 2015 09:18:46 +0530, rahul tiwari writes: I want to import PIL package but every time this is showing error no PIL module find . plz suggest me how i can fix this problem. Get Pillow. Instructions on how to install it here:

Re: ANN: eGenix PyRun - One file Python Runtime 2.1.0

2015-07-17 Thread Laura Creighton
I think Activestate makes a Python 2.y for Solaris. http://www.activestate.com/activepython I've never used it. Laura In a message of Thu, 16 Jul 2015 18:58:37 -0400, Alex writes: Do you have Python 2.7 64bit versions available for Solaris (10/11) x86/SPARC, AIX, and HP-UX IA/RISC? I've had the

Re: Noob in Python. Problem with fairly simple test case

2015-07-17 Thread Steven D'Aprano
On Fri, 17 Jul 2015 01:01 pm, Chris Angelico wrote: On Fri, Jul 17, 2015 at 12:44 PM, Steven D'Aprano st...@pearwood.info wrote: My take from all this is that overall, Python 3 take-up is probably around 10% of all Python users... Really? That low? Wow. Well, that's based on a guess that

[issue24652] C-API Pure Embedding enhancement

2015-07-17 Thread Justin Huang
New submission from Justin Huang: From the example in here: https://docs.python.org/2/extending/embedding.html#pure-embedding when directly using the example (compiling and trying with external file etc.) it doesn't work right away. Instead an extra line: PySys_SetArgv(argc, argv);

[issue21750] mock_open data is visible only once for the life of the class

2015-07-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 41d55ac50dea by Robert Collins in branch '3.4': Issue #21750: mock_open.read_data can now be read from each instance, as it https://hg.python.org/cpython/rev/41d55ac50dea New changeset 0da764c58322 by Robert Collins in branch '3.5': Issue #21750:

Re: A new module for performing tail-call elimination

2015-07-17 Thread Antoon Pardon
On 07/16/2015 08:58 PM, Steven D'Aprano wrote: Nice of you to illustrate how being pedantic about something, can make a response useless with regard to the intended original question. Just because your intention in giving that code was X, doesn't mean that others cannot use that code to also

Re: Noob in Python. Problem with fairly simple test case

2015-07-17 Thread Steven D'Aprano
On Fri, 17 Jul 2015 02:15 pm, Rick Johnson wrote: On Thursday, July 16, 2015 at 9:44:56 PM UTC-5, Steven D'Aprano wrote: [...] My take from all this is that overall, Python 3 take-up is probably around 10% of all Python users, All that rambling just to agree with me? My educated guess is

[issue24650] Error in yield expression documentation

2015-07-17 Thread swanson
New submission from swanson: https://docs.python.org/3/reference/expressions.html in 6.2.9. Yield expressions end of 1st paragraph: Using a yield expression in a function’s body causes that function to be a generator. NO! As the very next sentence explains, a generator is what's returned

[issue21750] mock_open data is visible only once for the life of the class

2015-07-17 Thread Berker Peksag
Berker Peksag added the comment: There are already explicit tests for that Great, then the test is fine :) Thanks for writing the patch. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21750

[issue21750] mock_open data is visible only once for the life of the class

2015-07-17 Thread Robert Collins
Robert Collins added the comment: Ok, so - good to commit to 3.4 and up? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21750 ___ ___

[issue24651] Mock.assert* API is in user namespace

2015-07-17 Thread Robert Collins
New submission from Robert Collins: We had a discussion on the list sparked by the assret checking, and in it I proposed that the API would be cleaner if the asserts were module functions. e.g. rather than:: a_mock.assert_called_with(Foo) assert_called_with(a_mock, Foo) Michael has

[issue24651] Mock.assert* API is in user namespace

2015-07-17 Thread Robert Collins
Changes by Robert Collins robe...@robertcollins.net: -- nosy: +berker.peksag, kushal.das, michael.foord ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24651 ___

[issue23792] help crash leaves terminal in echo off mode

2015-07-17 Thread swanson
swanson added the comment: Changing the title in case anyone else is looking for this bug. This is not raw mode. It's just that echo is turned off. It is sufficient to type (invisibly, of course): stty echo to resume normal use of the terminal. -- nosy: +swanson title: help crash

Re: A new module for performing tail-call elimination

2015-07-17 Thread Robin Becker
On 16/07/2015 17:17, Ian Kelly wrote: On Thu, Jul 16, 2015 at 3:28 AM, Robin Becker ro...@reportlab.com wrote: . I believe the classic answer is Ackermann's function http://demonstrations.wolfram.com/RecursionInTheAckermannFunction/ which is said to be not primitive

Re: A new module for performing tail-call elimination

2015-07-17 Thread Antoon Pardon
On 07/16/2015 09:34 PM, Terry Reedy wrote: On 7/16/2015 3:45 AM, Antoon Pardon wrote: On 07/15/2015 11:19 PM, Terry Reedy wrote: I believe that this pattern should work with any set of mutually recursive functions that always call each other in cyclic order. A more elaborate version does

[issue21750] mock_open data is visible only once for the life of the class

2015-07-17 Thread Robert Collins
Robert Collins added the comment: There are already explicit tests for that, do you want another one? -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21750 ___

Re: Proposed keyword to transfer control to another function

2015-07-17 Thread Antoon Pardon
On 07/17/2015 01:46 AM, Chris Angelico wrote: Open for bikeshedding: What should the keyword be? We can't use exec, which would match Unix and shell usage, because it's already used in a rather different sense in Python. Current candidates: transfer, goto, recurse, and anything else you

[issue24646] Python accepts SSL certificate that should be rejected on OSX

2015-07-17 Thread Ronald Oussoren
Ronald Oussoren added the comment: The fork of OpenSSL that Apple ships also looks at the CA list in the Keychain. IIRC that cannot be disabled. BTW. Annoyingly this fork uses a private API to access the keychain, which means we couldn't optionally use this behavior when not using Apple's

[issue24621] zipfile.BadZipFile: File is not a zip file

2015-07-17 Thread Alexei Romanov
Alexei Romanov added the comment: 7z archiver could extract this ZIP archive without any problems: ~/tmp $ 7z x not_working.zip 7-Zip [64] 9.20 Copyright (c) 1999-2010 Igor Pavlov 2010-11-18 p7zip Version 9.20 (locale=en_US.utf8,Utf16=on,HugeFiles=on,4 CPUs) Processing archive:

[issue24646] Python accepts SSL certificate that should be rejected on OSX

2015-07-17 Thread Antoine Pitrou
Antoine Pitrou added the comment: Do we know exactly why OS X's OpenSSL accepts it? -- nosy: +ned.deily, pitrou, ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24646 ___

Re: How does a dictionary work exactly?

2015-07-17 Thread Skip Montanaro
On Fri, Jul 17, 2015 at 9:32 AM, Ned Batchelder n...@nedbatchelder.com wrote: Maybe people are reading a different implementation than I am. Python's dict object doesn't use linked lists to deal with hash collisions, it probes other slots instead. No, I was working a) from memory, and b) not

Re: Proposed keyword to transfer control to another function

2015-07-17 Thread Chris Angelico
On Fri, Jul 17, 2015 at 5:17 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: On 07/17/2015 01:46 AM, Chris Angelico wrote: Open for bikeshedding: What should the keyword be? We can't use exec, which would match Unix and shell usage, because it's already used in a rather different sense

Re: Possibly Pythonic Tail Call Optimization (TCO/TRE)

2015-07-17 Thread Chris Angelico
On Fri, Jul 17, 2015 at 8:48 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: Just wondering, are traceback records of generators available? They are if an exception is raised in the generator itself, but what if an exception is raised in the loop that is driven by a generator. They don't

Re: Noob in Python. Problem with fairly simple test case

2015-07-17 Thread Jean-Michel Pichavant
- Original Message - From: Steven D'Aprano st...@pearwood.info 75% or 90% is not a vast majority. Vast majority implies more than 99%. You could not be more wrong. More than 99% is a stupendous majority, while within 95 to 99% is a tremendous majority. From the official Majority

[issue24653] Mock.assert_has_calls([]) incorrectly passes

2015-07-17 Thread Robert Collins
Robert Collins added the comment: This might go back further, haven't checked 3.3, but IIRC we're only doing fixes on 3.4 up anyhow. -- nosy: +berker.peksag, kushal.das, michael.foord versions: +Python 3.4, Python 3.5, Python 3.6 ___ Python tracker

[issue24653] Mock.assert_has_calls([]) incorrectly passes

2015-07-17 Thread Robert Collins
New submission from Robert Collins: From https://github.com/testing-cabal/mock/issues/243 from unittest import mock mmock = mock.MagicMock() mmock.foobar(baz) mmock.assert_has_calls([]) # No exception raised. Why?mmock.assert_has_calls(['x']) # Exception raised as expected. --- Traceback

Re: Possibly Pythonic Tail Call Optimization (TCO/TRE)

2015-07-17 Thread Antoon Pardon
On 07/16/2015 06:43 PM, Chris Angelico wrote: On Fri, Jul 17, 2015 at 12:32 AM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: What is unclear about as it is generally produced on stderr? That you can do a whole lot of stuff, doesn't mean that this whole lot of stuff is part of what

[issue24642] Will there be an MSI installer?

2015-07-17 Thread Alex Walters
Alex Walters added the comment: Having now worked with the new installer, there is nothing wrong with it, and provides sufficient scritpability, if that is a word. I only have two (and a half) thoughts on it: 1. This should be more prominently documented. The addition of the new web

eGenix at the EuroPython Conference 2015

2015-07-17 Thread eGenix Team: M.-A. Lemburg
eGenix.com at the EuroPython Conference 2015 July 20-26 2015 Bilbao, Spain Meet up with eGenix at this year's EuroPython Conference in Bilbao.

Re: Proposed keyword to transfer control to another function

2015-07-17 Thread Terry Reedy
On 7/17/2015 3:17 AM, Antoon Pardon wrote: On 07/17/2015 01:46 AM, Chris Angelico wrote: Open for bikeshedding: What should the keyword be? We can't use exec, which would match Unix and shell usage, because it's already used in a rather different sense in Python. Current candidates: transfer,

Re: Noob in Python. Problem with fairly simple test case

2015-07-17 Thread Chris Angelico
On Fri, Jul 17, 2015 at 4:47 PM, Steven D'Aprano st...@pearwood.info wrote: Jessie's default should be 2.7, at least. Wheezy shipped 2.7, too; it's only Squeeze (now out of support) that didn't ship any 2.7.x Python. Are you sure you can't at least upgrade to 2.7? I'm not sure, I'm not

[issue24621] zipfile.BadZipFile: File is not a zip file

2015-07-17 Thread Yasar L. Ahmed
Yasar L. Ahmed added the comment: @Serhiy These files are inside another Zip-bundle exported from a commercial control software for chromatography (UNICORN 6+ by GE Healthcare). Some of the other Zip-Files in the bundle work fine but some (like this one) don't. I'm writing a script to

Re: Need assistance

2015-07-17 Thread Igor Korot
Hi, Rob, On Fri, Jul 17, 2015 at 12:40 PM, Rob Gaddi rgaddi@technologyhighland.invalid wrote: On Thu, 16 Jul 2015 19:15:38 -0700, craig.sirna wrote: I need help writing a homework program. I'll write it, but I can't figure out how to incorporate what I have read in the book to work in

Re: how do you play python because i have gone on the website but i haven't managed to code?

2015-07-17 Thread sohcahtoa82
On Thursday, July 16, 2015 at 12:31:04 PM UTC-7, Aron Barsam wrote: how do you play python because i have gone on the website but i haven't managed to code? http://i.imgur.com/x2KwTbw.jpg -- https://mail.python.org/mailman/listinfo/python-list

Re: Proposed keyword to transfer control to another function

2015-07-17 Thread sohcahtoa82
On Friday, July 17, 2015 at 12:17:55 AM UTC-7, Antoon Pardon wrote: On 07/17/2015 01:46 AM, Chris Angelico wrote: Open for bikeshedding: What should the keyword be? We can't use exec, which would match Unix and shell usage, because it's already used in a rather different sense in Python.

Re: Need assistance

2015-07-17 Thread Rob Gaddi
On Thu, 16 Jul 2015 19:15:38 -0700, craig.sirna wrote: I need help writing a homework program. I'll write it, but I can't figure out how to incorporate what I have read in the book to work in code. The assignment wants us to take a users first, middle and last name in a single input (

Re: Proposed keyword to transfer control to another function

2015-07-17 Thread Ethan Furman
On 07/17/2015 12:17 AM, Antoon Pardon wrote: On 07/17/2015 01:46 AM, Chris Angelico wrote: Open for bikeshedding: What should the keyword be? We can't use exec, which would match Unix and shell usage, because it's already used in a rather different sense in Python. Current candidates: transfer,

tkinter resize question

2015-07-17 Thread nickgeovanis
Resizing a tkinter window which contains a frame which contains a button widget, will not change the current size of the window, frame or button as recorded in their height and width attributes (at least not if they are resizable). What is the correct way to detect their current size? --

Re: Need assistance

2015-07-17 Thread Mark Lawrence
On 17/07/2015 17:40, Rob Gaddi wrote: On Thu, 16 Jul 2015 19:15:38 -0700, craig.sirna wrote: I need help writing a homework program. I'll write it, but I can't figure out how to incorporate what I have read in the book to work in code. The assignment wants us to take a users first, middle

[issue24641] Log type of unserializable value when raising JSON TypeError

2015-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: I think it would be better to change error message to mention the type only. Yet one argument is that the repr of affected object can be very large, while the type name usually is short enough. repr() even can raise an exception (e.g. MemoryError).

Re: tkinter resize question

2015-07-17 Thread nickgeovanis
On Friday, July 17, 2015 at 1:53:19 PM UTC-5, nickge...@gmail.com wrote: Resizing a tkinter window which contains a frame which contains a button widget, will not change the current size of the window, frame or button as recorded in their height and width attributes (at least not if they are

[issue24649] python -mtrace --help is wrong

2015-07-17 Thread Terry J. Reedy
Changes by Terry J. Reedy tjre...@udel.edu: -- nosy: +belopolsky ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24649 ___ ___ Python-bugs-list

Re: Need Help w. Getting the Eclipse Python Add-On.

2015-07-17 Thread Emile van Sebille
On 7/17/2015 11:22 AM, Steve Burrus wrote: I Need immediate Help w. Getting the Eclipse Python Add-On. I looked all around the Eclipse website to try to get this but didn't see the add-on for this. Can someone please help me to find it? Thanx. Googling 'python ecplise' certainly yields a lot

Re: Noob in Python. Problem with fairly simple test case

2015-07-17 Thread Rick Johnson
On Friday, July 17, 2015 at 1:38:52 AM UTC-5, Steven D'Aprano wrote: 75% or 90% is not a vast majority. Vast majority implies more than 99%. But regardless of the precise meaning of vast, if you want to dismiss one in four people (25%) or one in ten (10%) as inconsequential, then you've got

[issue24641] Log type of unserializable value when raising JSON TypeError

2015-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: A typical TypeError message use the following pattern: TypeError: 'int' object is not callable as it is the class, not the value, that is the problem. If the same is always true for the JSON TypeError, at the point of failure, then the dumps message could

[issue24654] PEP 492 - example benchmark doesn't work (TypeError)

2015-07-17 Thread Terry J. Reedy
Terry J. Reedy added the comment: timeit(binary, 5, 3) timeit(abinary, 5, 3) gives me the same error running on Win 7 from Idle -- nosy: +terry.reedy stage: - needs patch type: enhancement - behavior ___ Python tracker rep...@bugs.python.org

Need Help w. Getting the Eclipse Python Add-On.

2015-07-17 Thread Steve Burrus
I Need immediate Help w. Getting the Eclipse Python Add-On. I looked all around the Eclipse website to try to get this but didn't see the add-on for this. Can someone please help me to find it? Thanx. -- https://mail.python.org/mailman/listinfo/python-list

[issue24621] zipfile.BadZipFile: File is not a zip file

2015-07-17 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Would it help to remove the offending bytes and then feed the bytes-object to ZipFile? Yes, it will. import zipfile, struct, io with open('not_working.zip', 'rb') as f: data = f.read() i = data.rindex(b'PK\5\6') + 22 i += struct.unpack('H', data[i-2:

Re: Need Help w. Getting the Eclipse Python Add-On.

2015-07-17 Thread Jerry Hill
On Fri, Jul 17, 2015 at 2:22 PM, Steve Burrus steveburru...@gmail.com wrote: I Need immediate Help w. Getting the Eclipse Python Add-On. I looked all around the Eclipse website to try to get this but didn't see the add-on for this. Can someone please help me to find it? Thanx. I think you're

[issue24654] PEP 492 - example benchmark doesn't work (TypeError)

2015-07-17 Thread Ezio Melotti
Changes by Ezio Melotti ezio.melo...@gmail.com: -- nosy: +ezio.melotti ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24654 ___ ___

[issue21750] mock_open data is visible only once for the life of the class

2015-07-17 Thread Robert Collins
Robert Collins added the comment: The fix for this uncovered more testing / scenarios that folk use mock_open for that were not accounted for. I'm reverting it from mock, and am going to roll-forward for Python: I should have a fix in a day or two and we can fix it more completely then.

Re: A new module for performing tail-call elimination

2015-07-17 Thread Terry Reedy
On 7/16/2015 3:45 PM, Marko Rauhamaa wrote: Nobody seemed to notice that I just posted a fairly typical tail call function: Because non-recursive tail calls are completely normal. Example: return len(self.children) Even tail operations like return a + b are tail calls if rewritten as

[issue24642] Will there be an MSI installer?

2015-07-17 Thread Steve Dower
Steve Dower added the comment: 1. This should be more prominently documented. Very true. I'll get a link to the updated docs page in there. 2. passing /? should list the available kay-value arguments. Should be doable. I've mostly been holding off until I stop changing the arguments. At

Re: tkinter resize question

2015-07-17 Thread Terry Reedy
On 7/17/2015 2:53 PM, nickgeova...@gmail.com wrote: Resizing a tkinter window which contains a frame which contains a button widget, will not change the current size of the window, frame or button as recorded in their height and width attributes (at least not if they are resizable). Post the

[issue24658] open().write() fails on 4 GB+ data (OS X)

2015-07-17 Thread Eric O. LEBIGOT
New submission from Eric O. LEBIGOT: On OS X, the Homebrew and MacPorts versions of Python 3.4.3 raise an exception when writing a 4 GB bytearray: open('/dev/null', 'wb').write(bytearray(2**31-1)) 2147483647 open('/dev/null', 'wb').write(bytearray(2**31)) Traceback (most recent call last):

Re: Proposed keyword to transfer control to another function

2015-07-17 Thread Paul Rubin
Chris Angelico ros...@gmail.com writes: # derived from Paul Rubin's example def quicksort(array, start, end): midp = partition(array, start, end) Heh, forgot to include the base case, as someone pointed out. Oh well, it's pseudocode, or something. transfer quicksort(array,

Re: A new module for performing tail-call elimination

2015-07-17 Thread Paul Rubin
Chris Angelico ros...@gmail.com writes: My point was that I have yet to see anything that demands TCO and can't be algorithmically improved. I don't think anyone claimed you can't simulate TCO with updateable variables and a while loop. TCO just sometimes lets you write some things in a

[issue24655] _ssl.c: Missing do for do {} while(0) idiom

2015-07-17 Thread Brian Cain
Brian Cain added the comment: Whoops, that's not right. Corrected. -- Added file: http://bugs.python.org/file39942/ssl_convert_3rd.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24655

[issue24655] _ssl.c: Missing do for do {} while(0) idiom

2015-07-17 Thread Brian Cain
Brian Cain added the comment: New patch. -- Added file: http://bugs.python.org/file39941/ssl_convert_2nd.patch ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24655 ___

[issue24563] Encoding declaration: doc supported encodings

2015-07-17 Thread Martin Panter
Martin Panter added the comment: You can remove the “.. XXX” line; I understand it is just like a TODO comment, and with this fixed it would no longer be relevant. I suggest putting the links next to the sentence that ends “. . . the encoding name must be recognized by Python.” The links

[issue24646] Python accepts SSL certificate that should be rejected on OSX

2015-07-17 Thread Ned Deily
Ned Deily added the comment: And the tradeoff for supplying private copies of newer OpenSSL libs with the Pythons installed by python.org OS X installers is that we would then need to solve the CA management problem for all users of those Pythons. So far there hasn't been a good solution to

[issue24646] Python accepts SSL certificate that should be rejected on OSX

2015-07-17 Thread Donald Stufft
Donald Stufft added the comment: For what it's worth, the El Capitan Beta's apparently don't ship with OpenSSL headers anymore though they do still ship with the dylibs. -- ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24646

[issue24563] Encoding declaration: doc supported encodings

2015-07-17 Thread Martin Panter
Martin Panter added the comment: PEP 263 doesn’t say exactly what encodings are supported. It mentions Shift JIS is supported, but UTF-16 is not. Only UTF-8 is allowed if the file starts with a UTF-8 BOM. I guess many of the Python-specific text encodings from the second section may be

[issue24536] os.pipe() should return a structsequence (or namedtuple.)

2015-07-17 Thread Martin Panter
Martin Panter added the comment: The original Python-ideas thread: https://www.marc.info/?t=14355895454 If you want shorter field names, how about just r and w (as they are currently documented)? os.write(our_pipe.w, bdata) os.read(our_pipe.r, 1024) “Input” and “output” would also work

[issue24642] Will there be an MSI installer?

2015-07-17 Thread Alex Walters
Alex Walters added the comment: on 2.5, I figured the answer would be along those lines. for 2, Linking to the documentation at least would be helpful (or otherwise indicating that there are arguments that are not listed and are in the docs) if the arguments cant be listed reasonably easily.

[issue24657] CGIHTTPServer module discard continuous '/' letters from params given by GET method.

2015-07-17 Thread takayuki
New submission from takayuki: I executed CGIHTTPServer and requested the following URI, http://localhost:8000/cgi-bin/test.py?k=aa%2F%2Fbb; to pass aa//bb as argument k, but test.py received aa/bb. I looked in CGIHTTPServer.py and found _url_collapse_path function discards continuous slash

[issue24658] open().write() fails on 2 GB+ data (OS X)

2015-07-17 Thread Eric O. LEBIGOT
Eric O. LEBIGOT added the comment: PS: I should have written 2 GB bytearray (so this looks like a signed 32 bit integer issue). -- title: open().write() fails on 4 GB+ data (OS X) - open().write() fails on 2 GB+ data (OS X) ___ Python tracker

Re: Proposed keyword to transfer control to another function

2015-07-17 Thread Serhiy Storchaka
On 17.07.15 02:46, Chris Angelico wrote: Out of the lengthy thread on tail call optimization has come one broad theory that might be of interest, so I'm spinning it off into its own thread. The concept is like the Unix exec[vlpe] family of functions: replace the current stack frame with a new

[issue5945] PyMapping_Check returns 1 for lists

2015-07-17 Thread Christian Barcenas
Changes by Christian Barcenas christ...@cbarcenas.com: -- versions: +Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue5945 ___ ___

Re: tkinter resize question

2015-07-17 Thread Terry Reedy
On 7/17/2015 9:31 PM, nickgeova...@gmail.com wrote: On Friday, July 17, 2015 at 5:55:19 PM UTC-5, Terry Reedy wrote: On 7/17/2015 2:53 PM, nickgeova...@gmail.com wrote: Resizing a tkinter window which contains a frame which contains a button widget, will not change the current size of the

[issue24658] open().write() fails on 2 GB+ data (OS X)

2015-07-17 Thread Serhiy Storchaka
Changes by Serhiy Storchaka storch...@gmail.com: -- components: +Extension Modules, IO -Interpreter Core nosy: +haypo, ned.deily, ronaldoussoren ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue24658

[issue24646] Python accepts SSL certificate that should be rejected on OSX

2015-07-17 Thread Ned Deily
Ned Deily added the comment: For what it's worth, the El Capitan Beta's apparently don't ship with OpenSSL headers anymore though they do still ship with the dylibs. Hmm, I had tested installing existing python.org binary releases with the first DPs of 10.11 and I *thought* I had tested

Re: tkinter resize question

2015-07-17 Thread Russell Owen
On 7/17/15 12:17 PM, nickgeova...@gmail.com wrote: On Friday, July 17, 2015 at 1:53:19 PM UTC-5, nickge...@gmail.com wrote: Resizing a tkinter window which contains a frame which contains a button widget, will not change the current size of the window, frame or button as recorded in their

[issue21258] Add __iter__ support for mock_open

2015-07-17 Thread Berker Peksag
Changes by Berker Peksag berker.pek...@gmail.com: -- nosy: +berker.peksag versions: +Python 3.6 ___ Python tracker rep...@bugs.python.org http://bugs.python.org/issue21258 ___

Re: tkinter resize question

2015-07-17 Thread Rick Johnson
On Friday, July 17, 2015 at 2:52:56 PM UTC-5, Russell Owen wrote: I'm not seeing it. If I try the following script I see that resizing the widget does update frame.winfo_width() and winfo_height. (I also see that the requested width and height are ignored; you can omit those). I wonder if

Re: Noob in Python. Problem with fairly simple test case

2015-07-17 Thread Mark Lawrence
On 17/07/2015 21:38, Laura Creighton wrote: I think kivy is doing a very nice job of python-on-the-mobile. Have you looked? Please do not rant at me, just tell me what you think. Laura At least rr occasionally comes out with something useful, usually WRT tkinter. He's in the bottom

Python Requirements

2015-07-17 Thread Luke Harrison
Dear Python-List As part of my A2 Computing coursework, I need to program a solution using Python 3.4. I also need to document the minimum requirements to run Python 3.4 on a Windows machine, including minimum RAM, minimum processing power, minimum hard disk space and monitor resolution.

[issue24655] _ssl.c: Missing do for do {} while(0) idiom

2015-07-17 Thread Brian Cain
New submission from Brian Cain: _ssl.c has a convert() macro which misuses the do { ... } while(0) pattern by accidentally omitting the do. This was discovered when building with clang, it reports while loop has empty body. Effectively, convert puts the body into gratuitous scope braces and

Re: Proposed keyword to transfer control to another function

2015-07-17 Thread Cameron Simpson
On 17Jul2015 20:43, Chris Angelico ros...@gmail.com wrote: On Fri, Jul 17, 2015 at 5:17 PM, Antoon Pardon antoon.par...@rece.vub.ac.be wrote: On 07/17/2015 01:46 AM, Chris Angelico wrote: Open for bikeshedding: What should the keyword be? We can't use exec, which would match Unix and shell

[issue24642] Will there be an MSI installer?

2015-07-17 Thread Roundup Robot
Roundup Robot added the comment: New changeset 06600287f11f by Steve Dower in branch '3.5': Issue #24642: Adds installer notes and links to What's New for 3.5 https://hg.python.org/cpython/rev/06600287f11f New changeset d6c91b8242d2 by Steve Dower in branch 'default': Issue #24642: Adds

[issue24650] Error in yield expression documentation

2015-07-17 Thread swanson
swanson added the comment: Okay, interesting - I hadn't checked the glossary. I don't ultimately care what it's called as long as the documentation is clear and consistent. But for anyone just looking at the names of the classes and the class hierarchy, they'd come away saying, A generator

Re: Possibly Pythonic Tail Call Optimization (TCO/TRE)

2015-07-17 Thread Terry Reedy
On 7/17/2015 7:43 AM, Antoon Pardon wrote: On 07/17/2015 01:05 PM, Chris Angelico wrote: def gen(): yield stuff yield more stuff for stuff in gen(): bomb with exception The error didn't happen in the generator, so I wouldn't expect to see it in the traceback. Yes something

Trac 1.1.6 Released

2015-07-17 Thread Ryan Ollos
Trac 1.1.6 Released === Trac 1.1.6, the final release on the 1.1.x development line leading up to 1.2, provides more than a half-dozen minor fixes and enhancements. Note that the 1.1.x releases are stable and tested snapshots of the trunk. They can be seen as sub-milestones on

Parsing and displaying C structs in a semi-intelligent way.

2015-07-17 Thread Anders Wegge Keller
In my day job, we have a large code base of mostly identical projects, each with their own customizations. The customizations can be a real pain sometimes. Especially when debugging binary data. The interesting part of the binary dumps are most often the stuff that are tweaked from project to

Re: Need assistance

2015-07-17 Thread Denis McMahon
On Thu, 16 Jul 2015 19:15:38 -0700, craig.sirna wrote: The assignment wants us to take a users first, middle and last name in a single input ( name=('enter your full name: )). Then we must display the full name rearranged in Last, First Middle order. To generate a list of words from a

Re: tkinter resize question

2015-07-17 Thread nickgeovanis
On Friday, July 17, 2015 at 5:55:19 PM UTC-5, Terry Reedy wrote: On 7/17/2015 2:53 PM, nickgeova...@gmail.com wrote: Resizing a tkinter window which contains a frame which contains a button widget, will not change the current size of the window, frame or button as recorded in their height

Re: Python Requirements

2015-07-17 Thread Chris Angelico
On Sat, Jul 18, 2015 at 7:37 AM, Luke Harrison lukeharriso...@gmail.com wrote: As part of my A2 Computing coursework, I need to program a solution using Python 3.4. I also need to document the minimum requirements to run Python 3.4 on a Windows machine, including minimum RAM, minimum

  1   2   >