Re: [Python-Dev] PEP 581: Using GitHub Issues for CPython

2019-03-07 Thread Matthew Woodcraft
On 07/03/2019 19.08, Mariatta wrote: I'd like to formally present to Python-dev PEP 581: Using GitHub Issues for CPython Full text: https://www.python.org/dev/peps/pep-0581/ This is my first PEP, and in my opinion it is ready for wider discussion. One part of this PEP stands out to me: | We

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-21 Thread Matthew Woodcraft
On 2018-04-21 19:02, Tim Peters wrote: > [Matthew Woodcraft <matt...@woodcraft.me.uk>] >> I would like to suggest one more motivating example for "Capturing >> condition values": multiple regex matches with 'elif'. >> >> if match := re.search(pat1, text

Re: [Python-Dev] PEP 572: Assignment Expressions

2018-04-21 Thread Matthew Woodcraft
On 2018-04-17 08:46, Chris Angelico wrote: > Having survived four rounds in the boxing ring at python-ideas, PEP > 572 is now ready to enter the arena of python-dev. I would like to suggest one more motivating example for "Capturing condition values": multiple regex matches with 'elif'. if match

Re: [Python-Dev] RFC: PEP 475, Retry system calls failing with EINTR

2014-09-03 Thread Matthew Woodcraft
In article CAMpsgwabYhXB0OG3UhdX=fucyonajgzpwd-g8stdaukjzpj...@mail.gmail.com, Victor Stinner victor.stin...@gmail.com wrote: 2014-09-02 23:03 GMT+02:00 Matthew Woodcraft matt...@woodcraft.me.uk: In any case I think PEP 475 should be explaining what is going to happen to signal.siginterrupt

Re: [Python-Dev] RFC: PEP 475, Retry system calls failing with EINTR

2014-09-02 Thread Matthew Woodcraft
Nick Coghlan ncogh...@gmail.com wrote: On 2 September 2014 07:17, Matthew Woodcraft matt...@woodcraft.me.uk wrote: (The program handles SIGTERM so that it can do a bit of cleanup before exiting, and it uses the signal-handler-sets-a-flag technique. The call that might be interrupted is sleep

Re: [Python-Dev] RFC: PEP 475, Retry system calls failing with EINTR

2014-09-02 Thread Matthew Woodcraft
Antoine Pitrou solip...@pitrou.net wrote: Matthew Woodcraft matt...@woodcraft.me.uk wrote: (The program handles SIGTERM so that it can do a bit of cleanup before exiting, and it uses the signal-handler-sets-a-flag technique. The call that might be interrupted is sleep(), so the program doesn't

Re: [Python-Dev] RFC: PEP 475, Retry system calls failing with EINTR

2014-09-01 Thread Matthew Woodcraft
Victor Stinner victor.stin...@gmail.com wrote: HTML version: http://legacy.python.org/dev/peps/pep-0475/ PEP: 475 Title: Retry system calls failing with EINTR I think the proposed design for how Python should behave is a good one. But I think this proposal needs to be treated in the same

Re: [Python-Dev] Counting collisions for the win

2012-01-21 Thread Matthew Woodcraft
Victor Stinner victor.stin...@haypocalc.com wrote: I propose to solve the hash collision vulnerability by counting collisions [...] We now know all issues of the randomized hash solution, and I think that there are more drawbacks than advantages. IMO the randomized hash is overkill to fix

Re: [Python-Dev] Proposed change to logging.basicConfig

2011-03-29 Thread Matthew Woodcraft
Terry Reedy tjre...@udel.edu wrote: I am bothered by mutually exclusive parameters. This is one reason I was glad to see cmp eliminated from list.sort. Quick: what happens if one passes both cmp and key to list.sort? There are three reasonable possibilities. As far as I can read, the answer

Re: [Python-Dev] Cleaning-up the new unittest API

2010-10-31 Thread Matthew Woodcraft
Raymond Hettinger raymond.hettin...@gmail.com wrote: I looked at this again and think we should just remove assertItemsEqual() from Py3.2 and dedocument it in Py2.7. It is listed as being new in 3.2 so nothing is lost. One thing that would be lost is that correct Python 2.7 code using

Re: [Python-Dev] Behaviour of max() and min() with equal keys

2010-09-08 Thread Matthew Woodcraft
Raymond Hettinger raymond.hettin...@gmail.com wrote: Matthew Woodcraft wrote: In CPython, the builtin max() and min() have the property that if there are items with equal keys, the first item is returned. From a quick look at their source, I think this is true for Jython and IronPython too

[Python-Dev] Behaviour of max() and min() with equal keys

2010-09-07 Thread Matthew Woodcraft
In CPython, the builtin max() and min() have the property that if there are items with equal keys, the first item is returned. From a quick look at their source, I think this is true for Jython and IronPython too. However, this isn't currently a documented guarantee. Could it be made so? (As with

Re: [Python-Dev] Behaviour of max() and min() with equal keys

2010-09-07 Thread Matthew Woodcraft
Mark Dickinson wrote: Matthew Woodcraft wrote: In CPython, the builtin max() and min() have the property that if there are items with equal keys, the first item is returned. From a quick look at their source, I think this is true for Jython and IronPython too. It's actually not clear to me

Re: [Python-Dev] PyPI comments and ratings, *really*?

2009-11-13 Thread Matthew Woodcraft
Martin v. Löwis mar...@v.loewis.de wrote: Because I want to wait for the outcome of the poll first. The pypi front page says: | The poll will be closed on December 1, 2009. The option that receives | most votes will be implemented. As I write, the option with the most votes is /Allow both

Re: [Python-Dev] PyPI comments and ratings, *really*?

2009-11-13 Thread Matthew Woodcraft
Steven D'Aprano st...@pearwood.info wrote: Why do you think it is okay to combine the Disallow vote, without also combining the Allow vote? Less than a third of the total votes are in favour of disallowing comments, with two-thirds in favour of allowing them. I don't. I was giving one

[Python-Dev] Subprocesses and SIGPIPE

2007-07-11 Thread Matthew Woodcraft
The documentation for the subprocess module says that it can be used as a replacement for shell pipelines, and gives an example. On *nix systems, cpython is set to ignore SIGPIPE, and this setting is inherited by child processes created by the subprocess module. This is nearly always not what you