[issue25702] Link Time Optimizations support for GCC and CLANG

2016-03-03 Thread Alecsandru Patrascu
Alecsandru Patrascu added the comment: >From our experience, pybench only is not a representative benchmark. Instead, >if you like to measure performance close to real workloads, you can run the >Grand Unified Python Benchmark suite, that is more complete. Also, you need to take into

Re: [Off-topic] Requests author discusses MentalHealthError exception

2016-03-03 Thread Marko Rauhamaa
Gregory Ewing : > Mass on its own is not a conserved quantity. The thing that's > conserved is total energy. Similarly, momentum is conserved. Whether mass is conserved or not depends on the chosen terminology. > As far as I know, there are no negative masses

Re: [Off-topic] Requests author discusses MentalHealthError exception

2016-03-03 Thread Gregory Ewing
alister wrote: On Thu, 03 Mar 2016 11:03:55 -0700, Ian Kelly wrote: On Thu, Mar 3, 2016 at 10:21 AM, alister wrote: Antimatter has positive mass. Are you sure? mix 1 atom of hydrogen + 1 of anti hydrogen & you end up with 0 mass That's not because

Re: Continuing indentation

2016-03-03 Thread Marko Rauhamaa
Steven D'Aprano : > class C: > def method(self): > if (result is None > or self.some_condition() > or len(some_sequence) > 100 > or some_other_condition > or page_count < 5 > ): >

Re: A mistake which almost went me mad

2016-03-03 Thread Gregory Ewing
Tim Golden wrote: A few teachers recently were discussing this on Twitter. One suggested that his pupils always add their initials to whatever filename they use. Works well until Lawrence Ian Bernstein writes his own module called "url"... -- Greg --

[issue26478] dict views don't implement subtraction correctly

2016-03-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0cae6b6e3d7d by Benjamin Peterson in branch '3.4': properly use the ObjArgs variant of CallMethod in dictview binary operations (closes #26478) https://hg.python.org/cpython/rev/0cae6b6e3d7d New changeset a5bc5c9490f5 by Benjamin Peterson in

Re: Continuing indentation

2016-03-03 Thread Steven D'Aprano
On Fri, 4 Mar 2016 12:23 pm, INADA Naoki wrote: >> >> >> Indeed. I don't understand why, when splitting a condition such as this, >> people tend to put the operator at the end of each line. >> >> > Because PEP8 says: > >> The preferred place to break around a binary operator is after the >

Re: creating zipfile with symlinks

2016-03-03 Thread Larry Martell
On Thu, Mar 3, 2016 at 4:58 PM, Chris Angelico wrote: > On Fri, Mar 4, 2016 at 8:38 AM, MRAB wrote: >> Is it even possible to zip a link? >> >> A quick search came up with this: >> >> Are hard links possible within a zip archive? >>

[issue26478] dict views don't implement subtraction correctly

2016-03-03 Thread Xiang Zhang
Changes by Xiang Zhang <18518281...@126.com>: -- nosy: +xiang.zhang ___ Python tracker ___ ___

Re: Continuing indentation

2016-03-03 Thread Erik
On 04/03/16 01:23, INADA Naoki wrote: Indeed. I don't understand why, when splitting a condition such as this, people tend to put the operator at the end of each line. Because PEP8 says: The preferred place to break around a binary operator is after the operator, not before it. I mean in

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-03-03 Thread INADA Naoki
INADA Naoki added the comment: I've tried LTO without PGO in Debian Jessie. $ LTOFLAGS='-flto -fuse-linker-plugin -ffat-lto-objects -flto-partition=none' $ CFLAGS=$LTOFLAGS LDFLAGS=$LTOFLAGS ./configure --prefix=... $ make -j32 results is here (compared with neither LTO and PGO): Test

Re: Continuing indentation

2016-03-03 Thread INADA Naoki
> > > Indeed. I don't understand why, when splitting a condition such as this, > people tend to put the operator at the end of each line. > > Because PEP8 says: > The preferred place to break around a binary operator is after the operator, not before it. http://pep8.org/#maximum-line-length --

Re: Continuing indentation

2016-03-03 Thread Erik
On 04/03/16 00:13, Steven D'Aprano wrote: class C: def method(self): if (result is None or self.some_condition() or len(some_sequence) > 100 or some_other_condition or page_count < 5 ):

Re: Continuing indentation

2016-03-03 Thread INADA Naoki
> > > class C: > def method(self): > if (result is None > or self.some_condition() > or len(some_sequence) > 100 > or some_other_condition > or page_count < 5 > ): > do_processing() > > > Looks fine

Re: Continuing indentation

2016-03-03 Thread Steven D'Aprano
On Fri, 4 Mar 2016 03:47 am, Marko Rauhamaa wrote: > John Gordon : > >> In <871t7sbkex@elektro.pacujo.net> Marko Rauhamaa >> writes: >> >>> Ethan Furman : >> >>> > No, it isn't. Using '\' for line continuation is strongly >>> >

Re: list reversal error

2016-03-03 Thread Steven D'Aprano
On Fri, 4 Mar 2016 09:51 am, vlyamt...@gmail.com wrote: > i have list of strings "data" and i am trying to build reverse list data1 Use a slice with a negative step-size and defaults for the start and end positions. data1 = data[::-1] -- Steven --

[Still off-top] Physics [was Requests author discusses MentalHealthError exception]

2016-03-03 Thread Steven D'Aprano
On Fri, 4 Mar 2016 07:20 am, alister wrote: > On Thu, 03 Mar 2016 11:03:55 -0700, Ian Kelly wrote: >> Antimatter has positive mass. > > Are you sure? > mix 1 atom of hydrogen + 1 of anti hydrogen & you end up with 0 mass (+ > LOTTS of energy) > > To be honest it is all over my head It's good

Re: [Off-topic] Requests author discusses MentalHealthError exception

2016-03-03 Thread William Ray Wing
> On Mar 3, 2016, at 3:20 PM, alister wrote: > > On Thu, 03 Mar 2016 11:03:55 -0700, Ian Kelly wrote: > >> On Thu, Mar 3, 2016 at 10:21 AM, alister >> wrote: >>> On Thu, 03 Mar 2016 13:35:12 +1100, Chris Angelico wrote: 1) No physical

Re: list reversal error

2016-03-03 Thread Gary Herron
On 03/03/2016 02:51 PM, vlyamt...@gmail.com wrote: i have list of strings "data" and i am trying to build reverse list data1 data1 = [] for i in range(len(data)): j = len(data) - i data1.append(data[j]) but i have the following error: data1.append(data[j]) IndexError: list index out of

[issue26478] dict views don't implement subtraction correctly

2016-03-03 Thread Josh Rosenberg
Changes by Josh Rosenberg : -- components: +Interpreter Core ___ Python tracker ___

Re: list reversal error

2016-03-03 Thread Mark Lawrence
On 03/03/2016 22:51, vlyamt...@gmail.com wrote: i have list of strings "data" and i am trying to build reverse list data1 data1 = [] for i in range(len(data)): j = len(data) - i data1.append(data[j]) but i have the following error: data1.append(data[j]) IndexError: list index out of

Re: list reversal error

2016-03-03 Thread MRAB
On 2016-03-03 23:08, John Gordon wrote: In <8b3d06eb-0027-4396-bdf8-fee0cc9ff...@googlegroups.com> vlyamt...@gmail.com writes: i have list of strings "data" and i am trying to build reverse list data1 data1 = [] for i in range(len(data)): j = len(data) - i data1.append(data[j]) but i

[issue26478] dict views don't implement subtraction correctly

2016-03-03 Thread Josh Rosenberg
New submission from Josh Rosenberg: Don't know when the problem was introduced, but dictviews_sub is doing: tmp = _PyObject_CallMethodId(result, _difference_update, "O", other); to implement subtraction (after creating result as a set of the keys in question). That's violating the

Re: list reversal error

2016-03-03 Thread Joel Goldstick
On Thu, Mar 3, 2016 at 6:08 PM, John Gordon wrote: > In <8b3d06eb-0027-4396-bdf8-fee0cc9ff...@googlegroups.com> > vlyamt...@gmail.com writes: > > > i have list of strings "data" and i am trying to build reverse list data1 > > data1 = [] > > for i in range(len(data)): > >j =

Re: list reversal error

2016-03-03 Thread John Gordon
In <8b3d06eb-0027-4396-bdf8-fee0cc9ff...@googlegroups.com> vlyamt...@gmail.com writes: > i have list of strings "data" and i am trying to build reverse list data1 > data1 = [] > for i in range(len(data)): >j = len(data) - i >data1.append(data[j]) > but i have the following error: >

Re: Inception

2016-03-03 Thread Denis Akhiyarov
Thank you Paul and Christian for your reply and understanding my question. I was actually inspired by this example for IronPython and thought that this is pretty useful for testing and exploring of C-API: http://www.voidspace.org.uk/ironpython/ip_in_ip.shtml So does it all boil down to GIL

list reversal error

2016-03-03 Thread vlyamtsev
i have list of strings "data" and i am trying to build reverse list data1 data1 = [] for i in range(len(data)): j = len(data) - i data1.append(data[j]) but i have the following error: data1.append(data[j]) IndexError: list index out of range am i doing it wrong? Thanks --

[issue26268] Update python.org installers to use OpenSSL 1.0.2f

2016-03-03 Thread Steve Dower
Steve Dower added the comment: Doesn't really matter, since we get to do it all again with #26465. -- resolution: fixed -> out of date stage: commit review -> resolved status: pending -> closed superseder: -> Upgrade OpenSSL shipped with python installers

Re: creating zipfile with symlinks

2016-03-03 Thread Chris Angelico
On Fri, Mar 4, 2016 at 8:38 AM, MRAB wrote: > Is it even possible to zip a link? > > A quick search came up with this: > > Are hard links possible within a zip archive? > http://stackoverflow.com/questions/8859616/are-hard-links-possible-within-a-zip-archive Hard

Re: creating zipfile with symlinks

2016-03-03 Thread MRAB
On 2016-03-03 20:58, Larry Martell wrote: On Thu, Mar 3, 2016 at 1:37 PM, Larry Martell wrote: I have a script that creates zip files of dirs containing symlinks. I was surprised to find that the zipfiles have zipped the targets of the links as opposed to the links

[issue26456] import _tkinter + TestForkInThread leaves zombie with stalled thread

2016-03-03 Thread Zachary Ware
Zachary Ware added the comment: I can confirm that child-exit.patch fixes the immediate issue, so I'm +1 on just committing it since it will make several buildbots useful again. Improving general handling of the situation can be done in a new issue. For the record, I agree that this seems to

Re: A mistake which almost went me mad

2016-03-03 Thread Tim Chase
On 2016-03-03 16:29, Oscar Benjamin wrote: > On 3 March 2016 at 11:48, Tim Chase > wrote: > > On 2016-03-03 10:43, Nick Sarbicki wrote: > >> The number of times I've had to correct a student for naming > >> their script "turtle.py". > >> > >> And the number of times

Re: Caching function results

2016-03-03 Thread Peter Otten
Pavel Volkov wrote: > Suppose, I have some resource-intensive tasks implemented as functions in > Python. > Those are called repeatedly in my program. > It's guranteed that a call with the same arguments always produces the > same return value. > I want to cache the arguments and return values

Re: creating zipfile with symlinks

2016-03-03 Thread Larry Martell
On Thu, Mar 3, 2016 at 1:37 PM, Larry Martell wrote: > I have a script that creates zip files of dirs containing symlinks. I > was surprised to find that the zipfiles have zipped the targets of the > links as opposed to the links themselves, which is what I wanted and >

Re: Caching function results

2016-03-03 Thread Ian Kelly
On Thu, Mar 3, 2016 at 1:28 PM, Pavel Volkov wrote: > Suppose, I have some resource-intensive tasks implemented as functions in > Python. > Those are called repeatedly in my program. > It's guranteed that a call with the same arguments always produces the same > return

Re: Caching function results

2016-03-03 Thread Martin A. Brown
Greetings Pavel, > Suppose, I have some resource-intensive tasks implemented as > functions in Python. Those are called repeatedly in my program. > It's guranteed that a call with the same arguments always produces > the same return value. I want to cache the arguments and return > values

Caching function results

2016-03-03 Thread Pavel Volkov
Suppose, I have some resource-intensive tasks implemented as functions in Python. Those are called repeatedly in my program. It's guranteed that a call with the same arguments always produces the same return value. I want to cache the arguments and return values and in case of repititive call

Re: [Off-topic] Requests author discusses MentalHealthError exception

2016-03-03 Thread Ian Kelly
On Thu, Mar 3, 2016 at 1:20 PM, alister wrote: > On Thu, 03 Mar 2016 11:03:55 -0700, Ian Kelly wrote: > >> On Thu, Mar 3, 2016 at 10:21 AM, alister >> wrote: >>> On Thu, 03 Mar 2016 13:35:12 +1100, Chris Angelico wrote: 1) No physical

Re: [Off-topic] Requests author discusses MentalHealthError exception

2016-03-03 Thread alister
On Thu, 03 Mar 2016 11:03:55 -0700, Ian Kelly wrote: > On Thu, Mar 3, 2016 at 10:21 AM, alister > wrote: >> On Thu, 03 Mar 2016 13:35:12 +1100, Chris Angelico wrote: >>> 1) No physical object can have negative mass. >>> 2) I am a part of the universe and have positive

Re: Explaining names vs variables in Python

2016-03-03 Thread Ian Kelly
On Thu, Mar 3, 2016 at 10:03 AM, Rustom Mody wrote: > Is it so damn hard to be a bit honest and when asked about is in python to > reply: > > If you dont know what you are doing, dont use 'is' (None excepted) > If you know why are you asking? That seems like a rather

Re: Continuing indentation

2016-03-03 Thread Marko Rauhamaa
Rob Gaddi : > Not ugly, error-prone. The first is purely aestehetic, the second > actually matters. Let something as simple as a trailing space sneak in > after your backslash and your meaning changes. Blank line between; > same thing. Never been bitten by

creating zipfile with symlinks

2016-03-03 Thread Larry Martell
I have a script that creates zip files of dirs containing symlinks. I was surprised to find that the zipfiles have zipped the targets of the links as opposed to the links themselves, which is what I wanted and expected. Googling I found this:

[issue26477] typing forward references and module attributes

2016-03-03 Thread Martijn Pieters
Martijn Pieters added the comment: > I wonder why they forward references are evaluated *at all* at this point. The Union type tries to reduce the set of allowed types by removing any subclasses (so Union[int, bool] becomes Union[int] only). That's all fine, but it should not at that point

[issue26477] typing forward references and module attributes

2016-03-03 Thread Antti Haapala
Antti Haapala added the comment: Indeed, the assumption is be that if a string is used, it is used there because the actual thing cannot be referenced by name at that point. Then trying to evaluate it at all would be an optimization in only those cases where it is used incorrectly /

[issue26477] typing forward references and module attributes

2016-03-03 Thread Alex Grönholm
Alex Grönholm added the comment: I wonder why they forward references are evaluated *at all* at this point. Seems senseless to me. This should be the job of the static type checker or the get_type_hints() function. -- nosy: +alex.gronholm ___

[issue26477] typing forward references and module attributes

2016-03-03 Thread Martijn Pieters
Martijn Pieters added the comment: A temporary work-around is to use a function to raise a NameError exception when the module attribute doesn't exist yet: def _forward_A_reference(): try: return a.A except AttributeError: # not yet.. raise NameError('A') class

[issue26477] typing forward references and module attributes

2016-03-03 Thread Martijn Pieters
Martijn Pieters added the comment: Sorry, that should have read "the forward references section of PEP 484". The section uses this example: # File models/a.py from models import b class A(Model): def foo(self, b: 'b.B'): ... # File models/b.py from models import a class B(Model): def

Re: Continuing indentation

2016-03-03 Thread Rob Gaddi
Marko Rauhamaa wrote: > John Gordon : > >> In <871t7sbkex@elektro.pacujo.net> Marko Rauhamaa >> writes: >> >>> Ethan Furman : >> >>> > No, it isn't. Using '\' for line continuation is strongly discouraged. >> >>> Why would you

[issue26477] typing forward references and module attributes

2016-03-03 Thread Martijn Pieters
New submission from Martijn Pieters: Forward references to a module can fail, if the module doesn't yet have the required object. The "forward references" section names circular dependencies as one use for forward references, but the following example fails: $ cat test/__init__.py from .a

Re: [Off-topic] Requests author discusses MentalHealthError exception

2016-03-03 Thread Ian Kelly
On Thu, Mar 3, 2016 at 10:21 AM, alister wrote: > On Thu, 03 Mar 2016 13:35:12 +1100, Chris Angelico wrote: >> 1) No physical object can have negative mass. >> 2) I am a part of the universe and have positive mass. >> 3) I am not Kenneth. >> 4) The sum of my mass and

Re: A mistake which almost went me mad

2016-03-03 Thread Rob Gaddi
Oscar Benjamin wrote: > On 3 March 2016 at 11:48, Tim Chase wrote: >> On 2016-03-03 10:43, Nick Sarbicki wrote: >>> The number of times I've had to correct a student for naming their >>> script "turtle.py". >>> >>> And the number of times I've caught myself doing

Re: [Off-topic] Requests author discusses MentalHealthError exception

2016-03-03 Thread alister
On Thu, 03 Mar 2016 13:35:12 +1100, Chris Angelico wrote: > On Thu, Mar 3, 2016 at 1:27 PM, Steven D'Aprano > wrote: >> We can be absolutely certain that Kenneth weighs less than the entire >> universe. We don't even need a set of scales. > > Formal proof: > > 1) No

[issue26474] ctypes: Memory leak at malloc_closure.c

2016-03-03 Thread Brett Cannon
Brett Cannon added the comment: As Victor pointed out, it's a cache so it's not meant to free its initially allocated memory but to reuse it. Closing this as "not a bug". -- nosy: +brett.cannon resolution: -> not a bug status: open -> closed ___

Re: Explaining names vs variables in Python

2016-03-03 Thread Rustom Mody
On Thursday, March 3, 2016 at 7:22:43 AM UTC+5:30, Steven D'Aprano wrote: > On Thu, 3 Mar 2016 05:12 am, Marko Rauhamaa wrote: > > > Steven D'Aprano : > > > >> In this case, "same object" carries the normal English meaning of > >> "same" and the normal computer science meaning of "object" in the

Re: Continuing indentation

2016-03-03 Thread Marko Rauhamaa
John Gordon : > In <871t7sbkex@elektro.pacujo.net> Marko Rauhamaa > writes: > >> Ethan Furman : > >> > No, it isn't. Using '\' for line continuation is strongly discouraged. > >> Why would you discourage valid syntax? > > Some things

Re: A mistake which almost went me mad

2016-03-03 Thread Oscar Benjamin
On 3 March 2016 at 11:48, Tim Chase wrote: > On 2016-03-03 10:43, Nick Sarbicki wrote: >> The number of times I've had to correct a student for naming their >> script "turtle.py". >> >> And the number of times I've caught myself doing it... > > I'm surprised at the

Re: [Off-topic] Requests author discusses MentalHealthError exception

2016-03-03 Thread Mark Lawrence
On 03/03/2016 03:57, Rustom Mody wrote: On Thursday, March 3, 2016 at 7:59:13 AM UTC+5:30, Steven D'Aprano wrote: On Thu, 3 Mar 2016 04:02 am, Rustom Mody wrote: And how is [1]'s starting different from Kenneth's finding his weight to be the weight of the universe? Is that a trick question?

Re: yield in try/finally case

2016-03-03 Thread Oscar Benjamin
On 3 March 2016 at 15:12, Random832 wrote: > On Thu, Mar 3, 2016, at 08:47, Peter Otten wrote: >> This is because the last generator uf = upperfile(...) is not garbage- >> collected and wasn't explicitly closed either. > > But the program hasn't ended yet when you run your

Re: yield in try/finally case

2016-03-03 Thread Peter Otten
Random832 wrote: > On Thu, Mar 3, 2016, at 08:47, Peter Otten wrote: >> This is because the last generator uf = upperfile(...) is not garbage- >> collected and wasn't explicitly closed either. > > But the program hasn't ended yet when you run your assertion. If your expectations are in line

Re: Continuing indentation

2016-03-03 Thread John Gordon
In <871t7sbkex@elektro.pacujo.net> Marko Rauhamaa writes: > Ethan Furman : > > No, it isn't. Using '\' for line continuation is strongly discouraged. > Why would you discourage valid syntax? Some things that are permissible may not be desirable. --

Re: merging number of csv files

2016-03-03 Thread Mark Lawrence
On 03/03/2016 09:46, m.t.e...@student.rug.nl wrote: Hey! I have been goggling around for the last few days and tried out many python codes. I want to merge two csv files, say thought_probe1.csv and thought_probe2.csv. I want them to merge column-wise in a new csv file 'new_file.csv'. What

[issue26476] Constness in _PyErr_BadInternalCall

2016-03-03 Thread Serhiy Storchaka
Changes by Serhiy Storchaka : -- resolution: -> fixed stage: commit review -> resolved status: open -> closed ___ Python tracker

[issue26476] Constness in _PyErr_BadInternalCall

2016-03-03 Thread Roundup Robot
Roundup Robot added the comment: New changeset 0e3526ab6a9b by Serhiy Storchaka in branch '2.7': Issue #26476: Fixed compilation error when use PyErr_BadInternalCall() in C++. https://hg.python.org/cpython/rev/0e3526ab6a9b -- nosy: +python-dev ___

[issue26476] Constness in _PyErr_BadInternalCall

2016-03-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: OK, now I understand. Since _PyErr_BadInternalCall() is private function, we will not break any code. Since it is used only by the PyErr_BadInternalCall() macro and always called with string literal as an argument, C++ user can't use PyErr_BadInternalCall()

Re: merging number of csv files

2016-03-03 Thread alister
On Thu, 03 Mar 2016 01:46:38 -0800, m.t.egle wrote: > Hey! > > I have been goggling around for the last few days and tried out many > python codes. that is where you are going wrong. you need to understand the concepts of what you are trying to do and an understanding of how the language works.

Re: Explaining names vs variables in Python

2016-03-03 Thread Mark Lawrence
On 03/03/2016 02:05, Steven D'Aprano wrote: On Thu, 3 Mar 2016 08:49 am, Mark Lawrence wrote: On 02/03/2016 17:23, Steven D'Aprano wrote: On Thu, 3 Mar 2016 01:11 am, Marko Rauhamaa wrote: What is missing is the rules that are obeyed by the "is" operator. I think what is actually missing

Re: yield in try/finally case

2016-03-03 Thread Steven D'Aprano
On Fri, 4 Mar 2016 02:00 am, Random832 wrote: > On Thu, Mar 3, 2016, at 06:52, 刘琦帆 wrote: >> I have just saw PEP 255, and it says that >> >> "A yield statement is not allowed in the try clause of a try/finally >> construct. The difficulty is that there's no guarantee the generator >> will ever

[issue26039] More flexibility in zipfile interface

2016-03-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Sorry for the delay Thomas. This is complex and important to me issue and I want to be attentive to it. I think we should preserve long existing behavior even if it is not documented (documenting or deprecating it is other issue). Concurrent reading and

Re: [Off-topic] Requests author discusses MentalHealthError exception

2016-03-03 Thread Steven D'Aprano
On Thu, 3 Mar 2016 02:57 pm, Rustom Mody wrote: > William Blake starts Auguries of Innocence with: > > To see a world in a grain of sand, > And a heaven in a wild flower, > Hold infinity in the palm of your hand, > And eternity in an hour. > > Reading the whole at

Re: yield in try/finally case

2016-03-03 Thread Random832
On Thu, Mar 3, 2016, at 08:47, Peter Otten wrote: > This is because the last generator uf = upperfile(...) is not garbage- > collected and wasn't explicitly closed either. But the program hasn't ended yet when you run your assertion. import sys _open = open files = [] def myclose(self):

Re: yield in try/finally case

2016-03-03 Thread Random832
On Thu, Mar 3, 2016, at 06:52, 刘琦帆 wrote: > I have just saw PEP 255, and it says that > > "A yield statement is not allowed in the try clause of a try/finally > construct. The difficulty is that there's no guarantee the generator > will ever be resumed, hence no guarantee that the finally block

Re: A mistake which almost went me mad

2016-03-03 Thread Tim Chase
On 2016-03-03 10:43, Nick Sarbicki wrote: > The number of times I've had to correct a student for naming their > script "turtle.py". > > And the number of times I've caught myself doing it... I'm surprised at the number of times I find myself creating an "email.py" DESPITE KNOWING BETTER EVERY

Re: yield in try/finally case

2016-03-03 Thread Peter Otten
刘琦帆 wrote: > 在 2016年3月3日星期四 UTC+8下午8:14:29,Oscar Benjamin写道: >> On 3 March 2016 at 11:52, 刘琦帆 wrote: >> > >> > "A yield statement is not allowed in the try clause of a try/finally >> > construct. The difficulty is that there's no guarantee the generator >> > will ever be

[issue26434] multiprocessing cannot spawn grandchild from a Windows service

2016-03-03 Thread Marc Schlaich
Marc Schlaich added the comment: Wrong bug... -- status: closed -> open ___ Python tracker ___ ___

[issue25918] AssertionError in lib2to3 on 2.7.11 Windows

2016-03-03 Thread Marc Schlaich
Marc Schlaich added the comment: We have some business privilege management solution running which might have corrupted the installation. As no one else is reporting this issue, this is my best guest for this phenomena and I'm going to close this issue. -- status: open -> closed

[issue26434] multiprocessing cannot spawn grandchild from a Windows service

2016-03-03 Thread Marc Schlaich
Marc Schlaich added the comment: We have some business privilege management solution running which might have corrupted the installation. As no one else is reporting this issue, this is my best guest for this phenomena and I'm going to close this issue. -- status: open -> closed

Re: looking into python...

2016-03-03 Thread Steven D'Aprano
On Thu, 3 Mar 2016 09:45 pm, crankypuss wrote: > Ben Finney wrote: > >> crankypuss writes: >> >>> "Python code can be packaged into stand-alone executable programs for >>> some of the most popular operating systems, allowing the distribution >>> of Python-based

Re: A mistake which almost went me mad

2016-03-03 Thread Steven D'Aprano
On Thu, 3 Mar 2016 09:21 pm, ast wrote: > Hello > > This has to be told > > I created a file pickle.py in order to test some files > read/write with objects and put it in a directory > which is on my python path. [...] > I uninstalled python34 and reinstalled it, same problem > I uninstalled

Re: yield in try/finally case

2016-03-03 Thread 刘琦帆
在 2016年3月3日星期四 UTC+8下午8:14:29,Oscar Benjamin写道: > On 3 March 2016 at 11:52, 刘琦帆 wrote: > > > > "A yield statement is not allowed in the try clause of a try/finally > > construct. The difficulty is that there's no guarantee the generator will > > ever be resumed, hence no

[issue26476] Constness in _PyErr_BadInternalCall

2016-03-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > CPython is written on C and provides C API. If you look at the title of https://docs.python.org/2/extending/extending.html clearly C++ extensions are also supported. > Even if change the signature of one function, this will not help much, > because a lot

[issue2202] urllib2 fails against IIS 6.0 (No support for MD5-sess auth)

2016-03-03 Thread Mathieu Dupuy
Mathieu Dupuy added the comment: I'm waiting for reviews. -- ___ Python tracker ___ ___ Python-bugs-list

Re: yield in try/finally case

2016-03-03 Thread Oscar Benjamin
On 3 March 2016 at 11:52, 刘琦帆 wrote: > > "A yield statement is not allowed in the try clause of a try/finally > construct. The difficulty is that there's no guarantee the generator will > ever be resumed, hence no guarantee that the finally block will ever get > executed;

[issue26039] More flexibility in zipfile interface

2016-03-03 Thread Thomas Kluyver
Thomas Kluyver added the comment: Serhiy, have you had a chance to look at what the zf.open(mode='w') patch does with the lock? -- ___ Python tracker

[issue26476] Constness in _PyErr_BadInternalCall

2016-03-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: CPython is written on C and provides C API. Even if change the signature of one function, this will not help much, because a lot of other functions require "char *" instead of "const char *". There is small disadvantage of changing the signature in a bugfix

yield in try/finally case

2016-03-03 Thread 刘琦帆
I have just saw PEP 255, and it says that "A yield statement is not allowed in the try clause of a try/finally construct. The difficulty is that there's no guarantee the generator will ever be resumed, hence no guarantee that the finally block will ever get executed; that's too much a

[issue26476] Constness in _PyErr_BadInternalCall

2016-03-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: > It is questionable wherever it should be backported to 2.7. It violates the C++ standard (for extension modules written in C++), so it's clearly a bug. -- ___ Python tracker

[issue26476] Constness in _PyErr_BadInternalCall

2016-03-03 Thread Serhiy Storchaka
Serhiy Storchaka added the comment: Was already fixed in 84618b2064c1. It is questionable wherever it should be backported to 2.7. Most other "const" additions were applied only to the default branch (see issue25923, issue24436, issue1772673, issue9369, issue16369, issue12173, issue1419652

[issue26466] could not build python 2.7.11 on AIX

2016-03-03 Thread STINNER Victor
Changes by STINNER Victor : -- nosy: -haypo ___ Python tracker ___ ___

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-03-03 Thread Alecsandru Patrascu
Alecsandru Patrascu added the comment: I understand now your question. LTO is not enabled when running just `make`, only in `make profile-opt` -- ___ Python tracker

Re: looking into python...

2016-03-03 Thread crankypuss
Ben Finney wrote: > crankypuss writes: > >> "Python code can be packaged into stand-alone executable programs for >> some of the most popular operating systems, allowing the distribution >> of Python-based software for use on those environments without >> requiring the

Re: A mistake which almost went me mad

2016-03-03 Thread Tim Golden
On 03/03/2016 10:43, Nick Sarbicki wrote: > On Thu, Mar 3, 2016 at 10:26 AM ast wrote: > >> Hello >> >> This has to be told >> >> I created a file pickle.py >> > > You could stop there. > > The number of times I've had to correct a student for naming their script >

Re: A mistake which almost went me mad

2016-03-03 Thread Nick Sarbicki
On Thu, Mar 3, 2016 at 10:26 AM ast wrote: > Hello > > This has to be told > > I created a file pickle.py > You could stop there. The number of times I've had to correct a student for naming their script "turtle.py". And the number of times I've caught myself doing it...

Re: merging two csv files

2016-03-03 Thread K. Elo
Hi! Is this a homework or something you need a quick solution for? For the latter: 'man paste' (on Linux) :) Anyway, some sample data and code would be good. BR, Kimmo 03.03.2016, 11:50, m.t.e...@student.rug.nl wrote: Hey! I want to merge column-wise two csv files, say: file1.csv and

Re: Continuing indentation

2016-03-03 Thread cl
codewiz...@gmail.com wrote: > On Wednesday, March 2, 2016 at 3:44:07 PM UTC-5, Skip Montanaro wrote: > > > > if (some_condition and > > some_other_condition and > > some_final_condition): > > play_bingo() > > How about: > > continue_playing = ( >

Re: A mistake which almost went me mad

2016-03-03 Thread Chris Angelico
On Thu, Mar 3, 2016 at 9:21 PM, ast wrote: > - python -m pip list doesnt work, crash with an error message related to > pickle At this point, you could have come to this list, asking for help - and posting the *entire* traceback. It may have mentioned a file name, which would

[issue26476] Constness in _PyErr_BadInternalCall

2016-03-03 Thread Jeroen Demeyer
New submission from Jeroen Demeyer: PyErr_BadInternalCall() calls _PyErr_BadInternalCall(__FILE__, __LINE__). Since __FILE__ is a string constant, the first argument of _PyErr_BadInternalCall should be a "const char*" instead of a "char*". This is a follow-up to #4949. Most of the patch from

A mistake which almost went me mad

2016-03-03 Thread ast
Hello This has to be told I created a file pickle.py in order to test some files read/write with objects and put it in a directory which is on my python path. Then the nightmare began - Idle no longer works, window no longer opens when double clicked, no errors messsages - python -m pip

[issue4949] Constness in PyErr_NewException

2016-03-03 Thread Jeroen Demeyer
Jeroen Demeyer added the comment: Follow-up: #26476 -- nosy: +jdemeyer ___ Python tracker ___ ___

Re: merging two csv files

2016-03-03 Thread Peter Otten
m.t.e...@student.rug.nl wrote: > I want to merge column-wise two csv files, say: file1.csv and file2.csv, > both containing two columns, into a new csv file. > > I could not find a good code for doing this. It never really worked. > > If you could show me the code with this example, I would

[issue25702] Link Time Optimizations support for GCC and CLANG

2016-03-03 Thread INADA Naoki
INADA Naoki added the comment: Sorry my poor English. I meant that "Does `./configure --with-lto && make` use LTO?". -- ___ Python tracker ___

  1   2   >