473,473 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

zero new keyword decorator


After a week of reading decorator discussion my mind slowly
turnes in the opposite direction: to find which syntaxes are absolutely
unwanted.

It seems that people like @ more than lambda, so this will never be in Python:

def fun:
dec1; dec2; dec3
lambda x, y:
""" docs """
body
Also our decorator discussion reminds me of Forth

BUILD>

DOES>

words. That is, decorators and arglist are after-build and
"does" part - after the ":".

Why not?
build fun(arg1, arg2):
decor1; decor2
decor3
def:
body
else:
(if everything went right)

Or, if we want to catch errors in decorators, a special version:
try def fun(arg1, arg2):
decor1; decor2
decor3
def:
body
except:
(if everything went wrong)
finally:
(anyway do this)
Or, if we want to say function is needed for decorators and not the other
way around:

for:
decor1
decor2
def fun(x, y):
body
What about

exec:
decor1
decor2
def fun(x, y):
body
Maybe this way we could get rid of '@':

decor1, decor2(a), decor3 for
def fun(x, y):
body

Sincerely yours, Roman Suzi
--
rn*@onego.ru =\= My AI powered by GNU/Linux RedHat 7.3
Jul 18 '05 #1
1 1004
Roman Suzi wrote:
After a week of reading decorator discussion my mind slowly
turnes in the opposite direction: to find which syntaxes are absolutely
unwanted.


Learn from Bengt Richter to keep a straight face while proposing something
really odd.
On the other hand - Guido could use his time machine to make these the
syntax suggestions that were avoided by the pie.
Speaking of which - why would he volunteer to take this pie straight into
Python's face. We need another Dan Sugalski.

Peter
--
Then again, it's 5am in Finland and I'm still moderately drunk.
-- Ville Vainio
Jul 18 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

3
by: Steven Bethard | last post by:
I mentioned in a previous post that I'd much prefer some sort of keyword as a decorator indication than a character like @ (or the recently suggested |). A promising note on python-dev: ...
7
by: Peter Otten | last post by:
I'm sure they have been mentioned somewhere but here are some more advantages of a decorator keyword (I use "transform"): - The docstring can be moved to the top of the decorator suite. - Simple...
13
by: Paul McGuire | last post by:
Thanks to everyone who has voted so far - please keep them coming! Lurkers, this means you! In the interests of saving time, I propose that an additional thread start soon, to determine choices...
14
by: Robert Brewer | last post by:
Just to put collected wisdom in one spot for now, here's what's in my draft: III. Choosing a keyword If a keyword is to be chosen over @ or other punctuation, the question remains, "which...
0
by: Hallvard B Furuseth | last post by:
I haven't managed to catch up with all the decorator articles, but: If we do get the pie syntax (or | or %% or whatever), is it too late to get '@<keyword> staticmethod' and not just...
30
by: Ron_Adam | last post by:
I was having some difficulty figuring out just what was going on with decorators. So after a considerable amount of experimenting I was able to take one apart in a way. It required me to take a...
22
by: Ron_Adam | last post by:
Hi, Thanks again for all the helping me understand the details of decorators. I put together a class to create decorators that could make them a lot easier to use. It still has a few glitches...
59
by: seberino | last post by:
I've heard 2 people complain that word 'global' is confusing. Perhaps 'modulescope' or 'module' would be better? Am I the first peope to have thought of this and suggested it? Is this a...
4
by: thomas.karolski | last post by:
Hi, I would like to create a Decorator metaclass, which automatically turns a class which inherits from the "Decorator" type into a decorator. A decorator in this case, is simply a class which...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.