[Python-Dev] [RELEASE] Python 2.7.14

2017-09-16 Thread Benjamin Peterson
I'm happy to announce to the immediate availability of Python 2.7.14, yet another bug fix release in the Python 2.7 series. 2.7.14 includes 9 months of conservative bug fixes from the 3.x branch. Downloads of source code and binaries are at:

Re: [Python-Dev] Why aren't decorators just expressions?

2017-09-16 Thread Guido van Rossum
It was and is all very intentional. I don't want to encourage line noise, which the at-sign already resembles. But namespacing and some form of parametrization (i.e. calls) are essential. So that's what we got. On Sep 16, 2017 11:30 AM, "Skip Montanaro" wrote: > >

Re: [Python-Dev] Why aren't decorators just expressions?

2017-09-16 Thread Skip Montanaro
> Indeed, I can’t remember a single time where I’ve needed that, let alone actually realized the restriction existed. Likewise. I suspect the use of a function sort of just fell out from the pre-decorator usage. Things like staticmethod()

Re: [Python-Dev] Why aren't decorators just expressions?

2017-09-16 Thread David Mertz
I always realized the restriction was there, and once in a while mention it in teaching. But I've NEVER had an actual desire to use anything other that a simple decorator or a "decorator factory" (which I realize is a decorator in the grammar, but it's worth teaching how to parameterize custom

Re: [Python-Dev] PEP 557: Data Classes

2017-09-16 Thread Steve Holden
​I make this suggestion in trepidation, given that Guido called a halt on the Great Naming Debate, but it seems that a short, neutral name with data connotations previously not a part of many popular subsystems is required. I therefore propose "row", which is sufficiently neutral to avoid most

Re: [Python-Dev] Why aren't decorators just expressions?

2017-09-16 Thread Barry Warsaw
On Sep 16, 2017, at 02:39, Larry Hastings wrote: > I'm not proposing that we allow arbitrary expressions as decorators... well, > I'm not doing that yet at least. But like I said, the syntax has been this > way for 13 years and I don't recall anybody complaining. Indeed,

Re: [Python-Dev] PEP 557: Data Classes

2017-09-16 Thread Sven R. Kunze
Thanks for the PEP! :) I like the naming. ;) Though, I would like to add to Michel's argument in favor of a base class. On 11.09.2017 08:38, Michel Desmoulin wrote: - I read Guido talking about some base class as alternative to the generator version, but don't see it in the PEP. Is it still

Re: [Python-Dev] Why aren't decorators just expressions?

2017-09-16 Thread Nick Coghlan
On 16 September 2017 at 21:22, Serhiy Storchaka wrote: > Actually I remember somebody raised this question a year or two ago, but > don't remember details. Aye, I remember that as well, but apparently the thread title for the discussion was sufficiently unrelated to the

Re: [Python-Dev] SK-CSIRT identified malicious software libraries in the official Python package repository, PyPI

2017-09-16 Thread Nick Coghlan
On 16 September 2017 at 07:08, Victor Stinner wrote: > Benjamin Bach and Hanno Böck are running > https://www.pytosquatting.org/ and registered many projects lilke > https://pypi.python.org/pypi/urllib2 > > "In June 2016, Typosquatting programming language package

Re: [Python-Dev] Why aren't decorators just expressions?

2017-09-16 Thread Serhiy Storchaka
16.09.17 12:39, Larry Hastings пише: So why don't decorators allow arbitrary expressions?  The PEP discusses the syntax for decorators, but that whole debate only concerned itself with where the decorator goes relative to "def", and what funny punctuation might it use.  It never says

[Python-Dev] Why aren't decorators just expressions?

2017-09-16 Thread Larry Hastings
The syntax for decorators in the grammar is quite specific: decorator: '@' dotted_name [ '(' [arglist] ')' ] NEWLINE Decorators can be either a dotted name, or a dotted name followed by arguments. This disallows: @mapping['async'] # looking something up in a mapping @func(1, 2,