The winner of the Python Decorator Poll is...

D

Doug Holton

George W Bush, as certified by Florida's election commission.


Which decorator syntax do you like the most? See
http://wiki.wxpython.org/index.cgi/PythonDecoratorsPoll
A. @classmethod def foo(): (82) 14%
C1. def foo() [classmethod]: (235) 41%
E1. def foo(): @classmethod (260) 45%

Total Votes: 577

People are about 6 to 1 against having the decorators come before the
"def" keyword.
 
J

Jack Diederich

George W Bush, as certified by Florida's election commission.


Which decorator syntax do you like the most? See
http://wiki.wxpython.org/index.cgi/PythonDecoratorsPoll
A. @classmethod def foo(): (82) 14%
C1. def foo() [classmethod]: (235) 41%
E1. def foo(): @classmethod (260) 45%

Total Votes: 577

People are about 6 to 1 against having the decorators come before the
"def" keyword.

Or people who don't like decorators before the def are six times as
likely to vote in the dissidents poll *wink*

-Jack
 
P

Peter Hansen

Doug said:
Which decorator syntax do you like the most? See
http://wiki.wxpython.org/index.cgi/PythonDecoratorsPoll
A. @classmethod def foo(): (82) 14%
C1. def foo() [classmethod]: (235) 41%
E1. def foo(): @classmethod (260) 45%

Total Votes: 577

People are about 6 to 1 against having the decorators come before the
"def" keyword.

While I voted in that poll, and in fact voted for one of the
two "after" methods (I forget which, doesn't matter), I want
to point out the danger of extrapolating from the poll results
to unsubstantiated claims such as the one you make.

The poll results show that by a ratio of 6 to 1, people
who voted prefer either of the second two options to the
first one. Nothing more, nothing less. The poll didn't
mention that it was a choice between before and after,
and therefore you shouldn't make assumptions about what
was in the minds of those voting.

For example, had the "decorate:" option that recently evolved
from discussion in this forum been present, I would have
preferred it over any of the methods show above. That's
because I'm not religious about the before or after thing
so much as I am over the punctuation and Pythonic-style
issues. The "decorate:" option is the closest fit with
Python style, IMHO, even more so than list-after-def, and
even the fact that it comes before the def doesn't bother
me since the indented block structure feels very similar
to other such constructs in Python.

And I'm sure I'm not alone, but nobody's done a poll on
it yet. ;-)

-Peter
 
P

Peter Hansen

Peter said:
The poll results show that by a ratio of 6 to 1, people
who voted prefer either of the second two options to the
first one. Nothing more, nothing less.

I should have said "prefer *one* of the second two options",
but it's not really germane to my point...
 
M

Michele Simionato

Jack Diederich said:
George W Bush, as certified by Florida's election commission.


Which decorator syntax do you like the most? See
http://wiki.wxpython.org/index.cgi/PythonDecoratorsPoll
A. @classmethod def foo(): (82) 14%
C1. def foo() [classmethod]: (235) 41%
E1. def foo(): @classmethod (260) 45%

Total Votes: 577

People are about 6 to 1 against having the decorators come before the
"def" keyword.

Or people who don't like decorators before the def are six times as
likely to vote in the dissidents poll *wink*

-Jack


Indeed. Actually I did not vote since I like the current proposal (maybe
I would like "|" more than "@") and I dislike all the alternatives,
especially having decorators inside the def.

So the poll is unavoidably biased. Happily, we are not in a democracy!


Michele Simionato
 
A

Andrew Durdin

Indeed. Actually I did not vote since I like the current proposal (maybe
I would like "|" more than "@") and I dislike all the alternatives,
especially having decorators inside the def.

Since you like the current proposal, why *didn't* you vote for it (it
was the first one)?
 
M

Michael Hudson

Andrew Durdin said:
Since you like the current proposal, why *didn't* you vote for it (it
was the first one)?

I didn't vote in the poll (or indeed read the first thread about it)
because I think polls are a very bad way of deciding things like this.

Cheers,
mwh
 
C

Christopher A. Craig

Andrew Durdin said:
Since you like the current proposal, why *didn't* you vote for it (it
was the first one)?

I didn't vote for it because I sit comfortable in the knowledge that
Guido will ignore the poll results.
 
P

Peter Hansen

Christopher said:
I didn't vote for it because I sit comfortable in the knowledge that
Guido will ignore the poll results.

But he won't ignore a consensus proposal, and one step to
forming a consensus is discussing the alternatives and
understanding the ideas of others. Polls can help us
do that, and can also make the discussion more efficient
and focused if it shows clearly than certain alternatives
are much disliked, as it may reduce discussion of those
alternatives as its proponents realize it is less likely
to win out. Given the number of people still suggesting
alternatives that have already been suggested and rejected,
it can only help...

-Peter
 
M

Michele Simionato

Andrew Durdin said:
Since you like the current proposal, why *didn't* you vote for it (it
was the first one)?

I didn't care to vote, since I thought it will win in any case, having the
support from Guido.

Michele Simionato
 
D

Doug Holton

Michele said:
Indeed. Actually I did not vote since I like the current proposal (maybe
I would like "|" more than "@") and I dislike all the alternatives,
especially having decorators inside the def.

So the poll is unavoidably biased. Happily, we are not in a democracy!


Do you think there are 400 people out there that read about the poll but
didn't vote because they like the current proposal as it stands? That's
what would have had to have happened for bias to completely invalidate
the results.
 
J

John J. Lee

Doug Holton said:
Do you think there are 400 people out there that read about the poll
but didn't vote because they like the current proposal as it stands?

Of course. *easily*

That's what would have had to have happened for bias to completely
invalidate the results.

Er, yup.


John
 
A

Anthony Baxter

So the poll is unavoidably biased. Happily, we are not in a democracy!

Hey, Python is a one-man-one-vote setup.

And the name of the man with the vote is Guido.
 
A

Anthony Baxter

Since you like the current proposal, why *didn't* you vote for it (it
was the first one)?

I didn't vote, because voting is a stupid way to design a language.
 
J

John J. Lee

Doug Holton said:
Can you try a non-troll response that involves a complete sentence?

I didn't intend to troll. Sorry if I came across as rude!

Taking my statements in reverse order, and expanding a little <wink>:

2. I don't question your simple arithmetic but...

1. Though you seem to think it ridiculously beyond the bounds of
possibility, it's very far from obvious that there are not 400 people
out there who read about this poll and supported the option that came
last, but did not vote. It wouldn't surprise me in the least, in
fact. Neither of us really has any evidence either way, which I why I
felt like counterbalancing your glib assumption.

I reject your prescriptive grammar, too, so there ;-)


John
 
T

Timothy Fitz

Anthony Baxter said:
I didn't vote, because voting is a stupid way to design a language.

In general yes, but if the alternative is pick one at random (which is
where Guido was when @ was picked, or so it sounds) I think voting is
preferable.
 

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

Forum statistics

Threads
473,769
Messages
2,569,582
Members
45,057
Latest member
KetoBeezACVGummies

Latest Threads

Top