[issue27604] More details about `-O` flag

2016-09-12 Thread Berker Peksag
Berker Peksag added the comment: This is a duplicate of issue 17232. Note that "This changes the filename extension for compiled files from ``.pyc`` to ``.pyo``." part is no longer true. See PEP 488 for details. -- nosy: +berker.peksag resolution: -> duplicate stage: -> resolved

[issue27604] More details about `-O` flag

2016-07-30 Thread R. David Murray
R. David Murray added the comment: Heh, that comment about Berker came out wrong. I meant, he seems willing to do, and make time for, the small doc commits that some of the rest of us don't seem to get around to, which is great. -- ___ Python

[issue27604] More details about `-O` flag

2016-07-30 Thread R. David Murray
R. David Murray added the comment: Oh, don't say never. Berker seems to like these kind of small commits, and it won't get lost. Who knows, I may even decide to tackle it. Or someone else will decide to do the research and update your patch. --

[issue27604] More details about `-O` flag

2016-07-30 Thread Ram Rachum
Ram Rachum added the comment: Well, I guess we had a fun week exchanging a couple thousand words about a two-line change to the docs that's now never going to happen ;) -- ___ Python tracker

[issue27604] More details about `-O` flag

2016-07-30 Thread R. David Murray
R. David Murray added the comment: I wouldn't object, but if I started to do it I'd wind up doing the research to "do it right" instead, so it would have to be someone else doing the intermediate commit :) -- ___ Python tracker

[issue27604] More details about `-O` flag

2016-07-30 Thread Ram Rachum
Ram Rachum added the comment: Hmm. What do you think about merging 3.patch now, and then possibly adding more information later? (Or asking the people who are designing the complex behvior you describe to write those docs.) -- ___ Python tracker

[issue27604] More details about `-O` flag

2016-07-30 Thread R. David Murray
R. David Murray added the comment: You know, it's actually more complicated than this now. We recently changed the way optimization levels are handled in pyc files in such a way that it is possible for other optimization 'levels" to be added by third parties. So the reference information is

[issue27604] More details about `-O` flag

2016-07-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: The -O entry is unchanged from when the Using doc was added in 2007. I believe there has been discussion about being more specific and that Guido said something, but that is the most I will say. -- ___ Python

[issue27604] More details about `-O` flag

2016-07-29 Thread Ram Rachum
Ram Rachum added the comment: Hi David, I attached a patch that follows your instructions, but to be honest, if I wasn't the person writing this patch and I wanted to find the information "Does Python do any optimization besides dumping asserts when I do -O?" I'm not sure I'd be able to

[issue27604] More details about `-O` flag

2016-07-29 Thread R. David Murray
R. David Murray added the comment: I think the cmdline ref telling you that optimizations are enabled or disabled is enough. If someone wants technical information they can click on the link. For comparison, the gcc man page lists what optimizations the -O levels enable, but does not

[issue27604] More details about `-O` flag

2016-07-29 Thread Terry J. Reedy
Terry J. Reedy added the comment: Ram > (At least my boss and team members have asked that, and people on Stack Overflow.) Ram, to me it would have been helpful if you had said this initially. It gives a doc change request a bit more force. -- nosy: +terry.reedy

[issue27604] More details about `-O` flag

2016-07-29 Thread Ram Rachum
Ram Rachum added the comment: I uploaded a new patch. I added another thing: Mentioning explicitly that no other optimizations are currently being made. I think this is important because it's often the question that the user is asking themselves. (At least my boss and team members have asked

[issue27604] More details about `-O` flag

2016-07-26 Thread R. David Murray
R. David Murray added the comment: It might be better to reduce redundancy (ie: minimize the places that would need changing) by creating a cross link from the option description to the technical details in veryhigh.rst. You could make the existing words 'basic optimizations' the link text.

[issue27604] More details about `-O` flag

2016-07-25 Thread Ram Rachum
Ram Rachum added the comment: I'm sorry everyone, for being unpleasant on this thread. Rereading the thread from the beginning, I think I misunderstood Brett's message and immediately saw it as someone trying to block my efforts rather than just answering the question I asked. Anyway, I

[issue27604] More details about `-O` flag

2016-07-25 Thread Stefan Krah
Changes by Stefan Krah : -- nosy: -skrah ___ Python tracker ___ ___ Python-bugs-list

[issue27604] More details about `-O` flag

2016-07-25 Thread Brett Cannon
Brett Cannon added the comment: If you had viewed the comment as esoteric, Ram, then you could have politely asked for a more in-depth explanation. To me the explanation seemed clear: the optimizations had not been documented so we could feel free in changing what -O meant without breaking

[issue27604] More details about `-O` flag

2016-07-25 Thread Brett Cannon
Changes by Brett Cannon : -- nosy: -brett.cannon ___ Python tracker ___ ___

[issue27604] More details about `-O` flag

2016-07-25 Thread Stefan Krah
Stefan Krah added the comment: I can see nothing wrong with msg271168. It's polite, informative, not apodictic and does not rule out the possibility of accepting a patch. Also, it answers a direct question from msg271142. -- nosy: +skrah ___ Python

[issue27604] More details about `-O` flag

2016-07-25 Thread Ram Rachum
Ram Rachum added the comment: Thanks for your understanding David. I'll submit a patch for this issue soon. -- ___ Python tracker ___

[issue27604] More details about `-O` flag

2016-07-25 Thread R. David Murray
R. David Murray added the comment: Heh, clarification on "we're explicit about this". I was referring to Nick's aphorism, "The status quo wins a tie", which means that there has to be a *postive* reason to change the status quo. That's what we're explicit about. --

[issue27604] More details about `-O` flag

2016-07-25 Thread R. David Murray
R. David Murray added the comment: Ram: Brett gave you the benefit of the doubt on whether or not your comment was *intended* to be antagonistic. Brett's comment was giving you the historical context for why it isn't documented, but said nothing about what we might do now. In fact, his use

[issue27604] More details about `-O` flag

2016-07-25 Thread Ram Rachum
Ram Rachum added the comment: Yes, my comment was antagonistic. I'm baffled that the first response to someone who wants to contribute to Python is an esoteric argument against the contribution. I understand that sometimes not all contributions can be accepted because they break existing

[issue27604] More details about `-O` flag

2016-07-24 Thread Brett Cannon
Brett Cannon added the comment: Two things. One, I don't know if you meant for your comment to come off as antagonistic, but it did. Two, a patch is fine as long as it makes it clear that what optimizations are activated by the flag could change with no backwards-compatibility guarantees.

[issue27604] More details about `-O` flag

2016-07-24 Thread Ram Rachum
Ram Rachum added the comment: So... The reasoning is that if someone adds optimizations to Python's `-O` mode (Something that hasn't happened in the last decade or two, right?) we want to save them from going to the trouble of writing two or three sentences in the docs describing the

[issue27604] More details about `-O` flag

2016-07-24 Thread Brett Cannon
Brett Cannon added the comment: No, there are only the two optimizations, but I think historically the vagueness has been on purpose to allow us to add appropriate optimizations without breaking backwards-compatibility with what is documented. -- nosy: +brett.cannon

[issue27604] More details about `-O` flag

2016-07-24 Thread Ram Rachum
New submission from Ram Rachum: I wanted to ensure that the `-O` flag doesn't really do anything more than remove assert statement and make `__debug__` equal `False`. But the documentation for `-O` doesn't cover it: https://docs.python.org/3/using/cmdline.html#cmdoption-O