Alternative decorator syntax decision

D

David Fraser

Peter said:
I believe that the result the direction this is taking is
inevitable: a widely split vote with no consensus. I did
think there was much more agreement about which one was the
best alternative, warts and all, to @pie and which one was
therefore the most likely to get any attention at all from
Guido. I also thought people had a better grasp of which
ones had already been *rejected* fairly conclusively.

Exactly. From this standpoint, the list on the wiki should be filtered
to something that
1) doesn't have the declaration in the body of the function
2) doesn't have the declaration following the parameters

1) rules out D1 D2 E1 E2
2) rules out C1 C2 C3 C4 E3

This leaves (with A left out as we're looking at alternatives)
B F G H I J1 J2 J3 J4 K L M

With the voting going the way it currently is J2 is winning anyway, the
only current close competitor would be C1 or a variant, but I think it
looks like J2 is going to be the one to form a concensus around.
(Current ranking is J2=38, C1=18, C1+C2+C3+C4=25, next highest is F=6,
out of 34 voters giving 102 votes).

The other one I supported was L but that's more on the basis of
if-we-have-to-have-it-this-way-at-least-make-it-a-keyword-not-a-punctuation-character
which I guess could always be argued for if J2 doesn't get it.

David
 
I

Istvan Albert

Paul said:
The significant alternatives have been listed on the Python wiki at
http://www.python.org/moin/PythonDecorators .

This page lists all the choices and not just the alternatives.
I would propose a multivote survey: each poster gets 3 votes among the
lettered choices on the Wiki page above. You can use all 3 for a single
option, or split them across 2 or 3 options if you are open to more than
one.

I have noticed that many people thought (or implied) that they
should be voting only for alternatives. Others voted for the
the existing implementation. This makes this poll even more
unreliable than usually.

I don't think one should ever devise a poll to test for
*second* options only. The second option only makes sense
in proper context when compared to the first option.

As more an more syntaxes came up and faced with increasingly
hairy syntaxes and heated arguments I start to believe
that Guido's choice is actually the best.

A1 E1

Istvan.
 
D

David Fraser

Istvan said:
This page lists all the choices and not just the alternatives.



I have noticed that many people thought (or implied) that they
should be voting only for alternatives. Others voted for the
the existing implementation. This makes this poll even more
unreliable than usually.

I don't think one should ever devise a poll to test for
*second* options only. The second option only makes sense
in proper context when compared to the first option.
Thats because the point of this vote is to try and gather a consensus
about what the best alternative is, not to try and out-vote the original
contender. The final decision will rest with Guido anyway, so we just
want to get together the best possible alternative proposal

David
 
J

John Crichton

Hi,

My vote: J2 J2 J2.

Surely any English language keyword that gives a meaningful hint as to
its purpose within a program has to be more readable than an arbitrary
'@' symbol?

Readability is one of Python's key strengths and I would be very sorry
to see this undermined.

Best wishes,

John
 
I

Istvan Albert

John said:
Surely any English language keyword that gives a meaningful hint as to
its purpose within a program has to be more readable than an arbitrary
'@' symbol?

so what is more 'readable'

x[1:10]

or

x[from 1 to 10 ]
 
P

Paul McGuire

Ville Vainio said:
Paul> (And let's hope we get at least as good a response as the "average age"
Paul> thread!)

Not going to happen, with the words "alternative decorator syntax" in
the subject. No sensible person wants to see yet another wacky
alternative, and the subject promises as much.

Hence, I won't vote yet because, at minimum, you need a better subject
line.

Something like this needs to be announced somewhere (e.g. daily
python-url).

Ville -

I'm afraid I have to agree, the subject is a poor one. I noticed that
yesterday as the responses were slow to come in. Something more on the
order of "READ THIS - IT'S FREAKIN' IMPORTANT!" is surely warranted.

I am still relatively new to Usenet, and surely not aware of how to update
the subject of an existing post, otherwise I would have done so!

But please don't abstain in voting over my poor judgment in titling this
thread, the responses are starting to trickle in (there was already a
cross-mention on python-dev). And I would not at all be offended if you
posted an additional note with some more-appropriate subject, directing
people to this process.

Thanks,
-- Paul
 
I

Istvan Albert

David said:
Thats because the point of this vote is to try and gather a consensus
about what the best alternative is,

But what if the alternative is that you don't need a best
alternative? There lies the crux of the problem.
> not to try and out-vote the original contender.

If you cannot out-vote the original contender than what
is the whole point of the poll? Why would this proposal be
accepted if it cannot outclass the original one?

Voting is an extremely tricky business. Arrow's theorem
proves that there is not voting scheme that could provide
a proper selection whenever there are more than two candidates
(in the two candidate case the scheme is simple majority).

Yet there are better and there are worse ways to reduce
the field to two candidates. What this poll attempts to do
(going only after the second place) is incorrect. It is bad
not just from the inherent unreliability of internet
polling but from design perspective.

Istvan.
 
V

Ville Vainio

Paul> I'm afraid I have to agree, the subject is a poor one. I
Paul> noticed that yesterday as the responses were slow to come
Paul> in. Something more on the order of "READ THIS - IT'S
Paul> FREAKIN' IMPORTANT!" is surely warranted.

Yup - for those just joining in, post somewhere in this thread, it
involves voting that all pythonistas know & love (along with the
associated grain of salt that goes with it here in
pythonland). Instructions in the root message.
 
P

Paul McGuire

Ville Vainio said:
Paul> I'm afraid I have to agree, the subject is a poor one. I
Paul> noticed that yesterday as the responses were slow to come
Paul> in. Something more on the order of "READ THIS - IT'S
Paul> FREAKIN' IMPORTANT!" is surely warranted.

Yup - for those just joining in, post somewhere in this thread, it
involves voting that all pythonistas know & love (along with the
associated grain of salt that goes with it here in
pythonland). Instructions in the root message.

Will you vote now? :)
 
V

Ville Vainio

H H J2


Yes, I like

| decorate2
| decorate1(42, "hello")
def f(x):
return x+1

And I don't mind the pie syntax either anymore.
 
V

Ville Vainio

Paul> Will you vote now? :)

Did already, on the thread w/o subject line change (I wasn't sure
whether your script/whatever would handle changing the subject line).
 
P

Paolino

Istvan said:
or more likely the 'illusion' of it.
IMO democracy stands in the will of helping people partecipate.Illusion
of democracy relays on (among the rest) convincing not to do it.....
Entropy leads us somewhere where we could easy define democracy in a
pragmatic way.If python is not a well defined politically correct
system,its users can still laugh about that while they ride the entropic
wave.

Paolino
 
P

Peter Hansen

Istvan said:
But what if the alternative is that you don't need a best
alternative? There lies the crux of the problem.

No, deciding if an alternative should be chosen is step two
at this point.
If you cannot out-vote the original contender than what
is the whole point of the poll? Why would this proposal be
accepted if it cannot outclass the original one?

It will *not* be accepted on the basis of whether or not
it can "outclass" (I assume you mean get more votes than)
the original one. As has been pointed out repeatedly,
this is not a democracy, and outvoting the @pie syntax
would do nothing.

The point is that we were asked *specifically* for a
community consensus on an alternative, if there should
be an alternative. This vote is to help form that consensus,
not to decide *if* there should be an alternative.

You might even say that the decision as to whether there
should be an alternative cannot be made until the outcome
of the vote is known. If no alternative gets overwhelming
support, then we are in the same situation as the old ternary
operator debate.

You were around for that, weren't you? The community could
not agree on *which alternative to doing nothing* was best,
so in the end nothing happened.

The parallel with the present debate is that if the community
cannot rally around any alternative as being better than
all the other non-@pie alternatives, then "nothing will happen"
and in this case that means @pie wins out and goes in 2.4.

-Peter
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,470
Messages
2,571,807
Members
48,797
Latest member
PeterSimpson
Top