Re: [Python-Dev] Call for prudence about PEP-572

2018-07-09 Thread Anthony Flury via Python-Dev
On 09/07/18 08:26, Matěj Cepl wrote: On 2018-07-07, 15:48 GMT, Guido van Rossum wrote: if validate(name := re.search(pattern, line).group(1)): return name Except there is no error handling for situations when re.search() returns None, so one shouldn't use it anyway (most of the

Re: [Python-Dev] Hashes in Python3.5 for tuples and frozensets

2018-05-17 Thread Anthony Flury via Python-Dev
on the speed of that operation; without consideration of how often that operation is used. On 17/05/18 09:16, Chris Angelico wrote: On Thu, May 17, 2018 at 5:21 PM, Anthony Flury via Python-Dev <python-dev@python.org> wrote: Victor, Thanks for the link, but to be honest it will just c

Re: [Python-Dev] Hashes in Python3.5 for tuples and frozensets

2018-05-17 Thread Anthony Flury via Python-Dev
with integers. See the following link for more information: http://python-security.readthedocs.io/vuln/cve-2012-1150_hash_dos.html Victor 2018-05-16 17:48 GMT-04:00 Anthony Flury via Python-Dev <python-dev@python.org>: This may be known but I wanted to ask this esteemed body first. I unde

[Python-Dev] Hashes in Python3.5 for tuples and frozensets

2018-05-16 Thread Anthony Flury via Python-Dev
This may be known but I wanted to ask this esteemed body first. I understand that from Python3.3 there was a security fix to ensure that different python processes would generate different hash value for the same input - to prevent denial of service based on crafted hash conflicts. I opened

[Python-Dev] Review of Pull Request 5974 please

2018-04-29 Thread Anthony Flury via Python-Dev
All, Can someone please review Pull Request 5974 on Python3.8 - the Pull request was submitted on 4th March - this pull request is associated with bpo-32933 To summarize the point of this pull request: It

Re: [Python-Dev] assignment expressions: an alternative proposal

2018-04-24 Thread Anthony Flury via Python-Dev
On 24/04/18 17:11, Yury Selivanov wrote: On Tue, Apr 24, 2018 at 12:03 PM, Ethan Furman wrote: [..] But I do write this: def wrapper(func, some_value): value_I_want = process(some_value) def wrapped(*args, **kwds): if value_I_want == 42: ...

Re: [Python-Dev] assignment expressions: an alternative proposal

2018-04-24 Thread Anthony Flury via Python-Dev
On 24/04/18 14:50, Yury Selivanov wrote: On Tue, Apr 24, 2018 at 9:46 AM, Nick Coghlan wrote: On 24 April 2018 at 23:38, Yury Selivanov wrote: I propose to use the following syntax for assignment expressions: ( NAME = expr ) I know that it

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

2018-04-21 Thread Anthony Flury via Python-Dev
On 21/04/18 11:18, Chris Angelico wrote: But you haven't answered anything about what "readable" means. Does it mean "if I look at this code, I can predict what dis.dis() would output"? Or does it mean "this code clearly expresses an algorithm and the programmer's intent"? Frequently I hear

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

2018-04-21 Thread Anthony Flury via Python-Dev
On 21/04/18 08:46, Chris Angelico wrote: doubled_items = [x for x in (items := get_items()) if x * 2 in items] This will leak 'items' into the surrounding scope (but not 'x'). At the risk of stating the obvious - wasn't there work in Python 3 to prevent leakage from comprehensions ? [x for x

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

2018-04-20 Thread Anthony Flury via Python-Dev
I am entirely new to this list, but if I can I would like share my comments : * I do think this proposal := has merit in my opinion; it does make some code more readable. * I think readability is only improved if : * target is restricted to a simple name - I don't see a benefit in

Re: [Python-Dev] Timeline for Pull request reviews in 3.8

2018-04-06 Thread Anthony Flury via Python-Dev
All, The three pull requests are : Python 2.7 - doc string fix : https://github.com/python/cpython/pull/6015 Python 3.8 - documentation fix : https://github.com/python/cpython/pull/5982 Python 3.8 - Small bug fix on unittest.mock.mock_open : https://github.com/python/cpython/pull/5974 The

[Python-Dev] Timeline for Pull request reviews in 3.8

2018-04-05 Thread Anthony Flury via Python-Dev
Can anyone enlighten me on what the expected time-line is for reviewing pull requests made on 3.8. I made a few simple fixes in Early March - and I understand everyone is busy. What is the time line and cut off dates for backports to 3.7 and 3.6. I also made a documentation change (based on

[Python-Dev] Git hub : CLA Not Signed label

2018-03-10 Thread Anthony Flury via Python-Dev
All, I submitted two Pull Requests last Sunday, only a few hours after I signed the CLA. I understand why the 'Knights who say ni' marked the Pull request as 'CLA Not Signed' Label at the time I submitted the Pull requests, but I was wondering when the Labels get reset. How often (if at