J
Jeff Shannon
Robert said:
I'll sign in favor of this proposal.
Jeff Shannon
Technician/Programmer
Credit International
Robert said:
Michael Sparks said:It's very possible that we might end up with @pie syntax or nothing. (I
suspect the latter is very unlikely, but it's still possible)
My personal initial reaction to the syntax was "ugh", followed by listening
to arguments and deciding that I could live with @pie happily (I do like
perl after all so I've not got a huge aversion to punctuation).
* People will revert to using metaclass approaches, which having
tried them I think people will find worse than something more
explicit & in your face. (Almost any syntax on the wiki IMO is
better than a metaclass approach)
been used in earnest then IMHO option A1 should be chosen, via a
__future__ import. Whilst I'm obviously in favour of J2, option A1
strikes me as by _far_ the simplest to write or provide tools to
programmatically munge people's code if syntax does change. (Much
like the tools to remove unnecessary __future__ statements)
Paul said:I don't have a strong opinion of whether J2 is better than @pie or vice
versa. I dislike both.
My problem with @pie is that it doesn't get enough mileage out of the
@ character. I'd almost rather use @ as a keyword introducer, like #
in the prepreprocessor. And of course, @pie should be useable on
classes rather than just functions.
I think decorators can do things that metaclasses can't.
I really wouldn't worry too much about the effect on current syntax
tools.
Changing Python's syntax will have longer-lasting consequences than
having to update some tools.
Paul Rubin said:How do you handle the other proposed uses of decorators, e.g. type
declarations?
def foo as int (a as string, b as int):
...
seems pretty awful to me.
Type declarations make me cringe, but if I *had* to have them then 'b as
int' is the best syntax I could imagine for them offhand.
Robert Brewer said:
Robert said:This is a call for all who wish to sign the proposal, either for,
against, or abstaining.
1 The @pie implementation might stay as is.
2 The @pie implementation might stay, but require explicit activation
needing a __future__ statement. This to my mind is a good option - it
clearly marks the feature as experimental, making people shy away from
use unless they really do need it.
3 J2 might be accepted.
4 The feature might be ripped out
* etc...
Options 2 or 3 strike me as the best approach here - introduce a feature,
mark it as experimental, with a large warning that it might change in the
next release. That potentially allows the best of both worlds - people can
use the feature in earnest, but do so on the understanding that the feature
may change in a later release meaning that if they use it they have to be
prepared to change their code. Furthermore if they release code using the
feature they should be very careful how they use the feature.
Michael said:I think I'd agree. However for many people outside of python-dev and those
who only dip into c.l.p, the @pie came as a big shock.
It came as a shock to people *in* python-dev, too. It just
appeared one day as a fait accompli, without any opportunity
for discussion.
Paul Rubin said:b:int worked ok in Pascal.
Robert said:This is a call for all who wish to sign the proposal, either for,
against, or abstaining.
Patch against current CVS including __future__ statements/declarations
has now been created, tested and uploaded to SourceForge. All tests
pass.
British Broadcasting Corporation, Research and Development
Richie said:[Michael]Patch against current CVS including __future__
statements/declarations has now been created, tested and uploaded to
SourceForge. All tests pass.
Nice one - well done for all your work on this.
Is my license fee paying for this? If so, great!Makes for a
much better investment than Fame Academy.
This is a call for all who wish to sign the proposal, either for,
against, or abstaining.
I'd encourage anyone who's interested in python's
advancement to do the same, to be honest. The codebase is one of the
cleanest I've encountered and fairly easy to get started with, and it's
been a pleasure to work on.
We have a (small) allocation in our time for "bright ideas" regarding
things that'll help the BBC in ways outside normal projects, and help
further tools etc we use.
I don't know what additional discussion on python-dev would have
accomplished. Almost no-one spoke up about the @syntax when I posted
the first note.
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.