[issue14133] improved PEP 409 implementation

2012-06-28 Thread Patrick Westerhoff
Patrick Westerhoff added the comment: Alright, thought so but wanted a confirmation anyway – thanks a lot :D -- ___ Python tracker ___ __

[issue14133] improved PEP 409 implementation

2012-06-28 Thread Nick Coghlan
Nick Coghlan added the comment: Yep - note that PEP 409 was updated to say that the the implementation discussion has been superceded by PEP 415. It may be worth making that note more prominent, though... -- ___ Python tracker

[issue14133] improved PEP 409 implementation

2012-06-28 Thread Patrick Westerhoff
Patrick Westerhoff added the comment: Hey, I just saw the release notes for 3.3 and would like a quick confirmation: This is included in 3.3, right? ^^ -- ___ Python tracker __

[issue14133] improved PEP 409 implementation

2012-05-15 Thread Benjamin Peterson
Benjamin Peterson added the comment: 2012/5/15 Georg Brandl : > > Georg Brandl added the comment: > > I hope you're not disappointed when that PEP doesn't show up in the release > notes :) It gives me more peace of mind than any release note ever could. :) -- ___

[issue14133] improved PEP 409 implementation

2012-05-15 Thread Georg Brandl
Georg Brandl added the comment: I hope you're not disappointed when that PEP doesn't show up in the release notes :) -- ___ Python tracker ___ _

[issue14133] improved PEP 409 implementation

2012-05-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: Thanks for the review/dictating, Nick! -- resolution: -> fixed status: open -> closed ___ Python tracker ___ __

[issue14133] improved PEP 409 implementation

2012-05-14 Thread Roundup Robot
Roundup Robot added the comment: New changeset b0eb7d2a9542 by Benjamin Peterson in branch 'default': PEP 415: Implement suppression of __context__ display with an exception attribute http://hg.python.org/cpython/rev/b0eb7d2a9542 -- nosy: +python-dev __

[issue14133] improved PEP 409 implementation

2012-05-14 Thread Nick Coghlan
Nick Coghlan added the comment: I have accepted the PEP. Issue 14805 now covers the separate question of allowing both __cause__ and __context__ to be displayed in the same traceback. -- ___ Python tracker _

[issue14133] improved PEP 409 implementation

2012-03-16 Thread Nick Coghlan
Nick Coghlan added the comment: With the decision on whether or not to suppress the context moved out to a separate flag, I think we need to allow it. Requiring that the flag be False *and* that the context also be None gets us back to asking the question of why the flag doesn't work when the

[issue14133] improved PEP 409 implementation

2012-03-14 Thread Benjamin Peterson
Benjamin Peterson added the comment: I'm wondering if allowing printing __context__ and __cause__ is the best idea. Both could have chains and if they do it will be very non-obvious which one came from which. -- ___ Python tracker

[issue14133] improved PEP 409 implementation

2012-03-11 Thread Nick Coghlan
Nick Coghlan added the comment: Reviewed - actual impl looks good to me, couple of comments regarding the docs and tests. -- ___ Python tracker ___

[issue14133] improved PEP 409 implementation

2012-03-11 Thread Benjamin Peterson
Benjamin Peterson added the comment: Nick, care to look at the latest patch? -- ___ Python tracker ___ ___ Python-bugs-list mailing l

[issue14133] improved PEP 409 implementation

2012-03-05 Thread Benjamin Peterson
Benjamin Peterson added the comment: Now with implicit setting of __suppress_context__! -- Added file: http://bugs.python.org/file24742/pep415.patch ___ Python tracker ___ _

[issue14133] improved PEP 409 implementation

2012-03-02 Thread Patrick Westerhoff
Changes by Patrick Westerhoff : -- nosy: +poke ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.pyth

[issue14133] improved PEP 409 implementation

2012-02-27 Thread Nick Coghlan
Nick Coghlan added the comment: Also, ensuring class invariants by setting derived attributes correctly is one of the primary use cases for properties, so objecting to my proposed approach is objecting to a fairly fundamental programming technique. --

[issue14133] improved PEP 409 implementation

2012-02-27 Thread Nick Coghlan
Nick Coghlan added the comment: The alternatives are a backwards compatibility break (i.e. raise exc from other_exc would suppress the context, but exc.__cause__ = other_exc would not) or else that we don't succeed in eliminating the dual use of __cause__ in the display routines. Given that

[issue14133] improved PEP 409 implementation

2012-02-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: I don't think it's a good idea for setting one attribute to implicitly set another. -- ___ Python tracker ___ _

[issue14133] improved PEP 409 implementation

2012-02-27 Thread Benjamin Peterson
Changes by Benjamin Peterson : -- resolution: rejected -> status: closed -> open Added file: http://bugs.python.org/file24667/pep415.patch ___ Python tracker ___ ___

[issue14133] improved PEP 409 implementation

2012-02-27 Thread Benjamin Peterson
Benjamin Peterson added the comment: Now with doc changes! -- Added file: http://bugs.python.org/file24664/pep415.patch ___ Python tracker ___ __

[issue14133] improved PEP 409 implementation

2012-02-26 Thread Georg Brandl
Georg Brandl added the comment: FWIW, I agree with Nick: once we go as far as writing PEPs for smaller features, we should keep to the spec as accepted. -- nosy: +georg.brandl ___ Python tracker _

[issue14133] improved PEP 409 implementation

2012-02-26 Thread Nick Coghlan
Nick Coghlan added the comment: Regardless, I'm rejecting this for not complying with the PEP specification (which is quite explicit about the implementation mechanism and the API exposed to Python). If you want to challenge an approved PEP, the correct way to go about it is to write a new PE

[issue14133] improved PEP 409 implementation

2012-02-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: > The other problem with the "separate attribute" approach is that it > makes the condition for suppressing the context ugly: > > exc.__suppress_context__ or exc.__cause__ is not None > > That's hardly cleaner than: > > exc.__cause__ is not Ellipsis I fi

[issue14133] improved PEP 409 implementation

2012-02-26 Thread Nick Coghlan
Nick Coghlan added the comment: The other problem with the "separate attribute" approach is that it makes the condition for suppressing the context ugly: exc.__suppress_context__ or exc.__cause__ is not None That's hardly cleaner than: exc.__cause__ is not Ellipsis -- _

[issue14133] improved PEP 409 implementation

2012-02-26 Thread Nick Coghlan
Nick Coghlan added the comment: Because you're breaking the semantics of the "raise X from Y" syntax. That syntax is *just* syntactic sugar for "_exc = X; _exc.__cause__ = Y; raise _exc". Under PEP 409, that remains true. Your patch breaks it. If you want to change the meaning for "raise X

[issue14133] improved PEP 409 implementation

2012-02-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: I find this cleaner than the contrived "Ellipsis as magic value" solution, myself :) -- ___ Python tracker ___ ___

[issue14133] improved PEP 409 implementation

2012-02-26 Thread Benjamin Peterson
Benjamin Peterson added the comment: Maybe it's not awful, but why is this not a cleaner solution? -- ___ Python tracker ___ ___ Pyth

[issue14133] improved PEP 409 implementation

2012-02-26 Thread Nick Coghlan
Nick Coghlan added the comment: I don't consider using Ellipsis as a sentinel value a mess. If you don't like the PEP's solution, take it up with Guido. -- ___ Python tracker _

[issue14133] improved PEP 409 implementation

2012-02-26 Thread Benjamin Peterson
Benjamin Peterson added the comment: Here's a patch which doesn't use the dict. -- Added file: http://bugs.python.org/file24651/pep409.patch ___ Python tracker ___ _

[issue14133] improved PEP 409 implementation

2012-02-26 Thread Arfrever Frehtes Taifersar Arahesis
Changes by Arfrever Frehtes Taifersar Arahesis : -- nosy: +Arfrever ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscri

[issue14133] improved PEP 409 implementation

2012-02-26 Thread Benjamin Peterson
Benjamin Peterson added the comment: __suppress_context__ parallels with __cause__ and __context__. -- ___ Python tracker ___ ___ Pyt

[issue14133] improved PEP 409 implementation

2012-02-26 Thread Antoine Pitrou
Antoine Pitrou added the comment: I don't think it has to be a __special__ attribute. suppress_context would probably be fine. Also, instead of looking up the attribute in the dict, why not have a dedicated C member? -- nosy: +pitrou ___ Python tra

[issue14133] improved PEP 409 implementation

2012-02-26 Thread Benjamin Peterson
New submission from Benjamin Peterson : It uses a __suppress_context__ attribute rather than the whole Ellipsis mess. -- components: Interpreter Core files: pep409.patch keywords: patch messages: 154358 nosy: benjamin.peterson, ncoghlan priority: normal severity: normal status: open titl