473,383 Members | 1,829 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,383 software developers and data experts.

Decorator "platform"

Hello,

no, I won't start another @ discussion thread; just wondering: Everyone
is up and starting with decorators, coding decorator functions, wrapper
etc. Many of these ideas sound great, and it would be a big advantage to
everyone following to have the different uses of decorators collected,
to serve as a starting point or a repository of what's possible.

What I have in mind is a sort of "decorator library" where everyone who
has written a useful function of that kind can share it with others,
instead of only posting it here. As I don't know whether there will be a
"decorators" module in the stdlib, this would serve as a replacement
until decorators are a final language feature.

How would one realise such a project?

Reinhold

--
Wenn eine Linuxdistribution so wenig brauchbare Software wie Windows
mitbrächte, wäre das bedauerlich. Was bei Windows der Umfang eines
"kompletten Betriebssystems" ist, nennt man bei Linux eine Rescuedisk.
-- David Kastrup in de.comp.os.unix.linux.misc
Jul 18 '05 #1
8 1205
Reinhold Birkenfeld wrote:
it would be a big advantage to
everyone following to have the different uses of decorators collected,
to serve as a starting point or a repository of what's possible.

What I have in mind is a sort of "decorator library" where everyone who
has written a useful function of that kind can share it with others,
instead of only posting it here. As I don't know whether there will be a
"decorators" module in the stdlib, this would serve as a replacement
until decorators are a final language feature.

How would one realise such a project?


Maybe you could create a PythonDecoratorLibrary page at the Python wiki:
http://www.python.org/moin/PythonDecoratorLibrary
Click the UserPreferences link on the top right to register for an
account to be able to edit pages there. And surround your python syntax
with {{{ }}} so the formatting stays the same. Example:

{{{
#!python

@classmethod
def foo (arg1, arg2):
....
}}}
Jul 18 '05 #2
Doug Holton wrote:
Reinhold Birkenfeld wrote:
it would be a big advantage to
everyone following to have the different uses of decorators collected,
to serve as a starting point or a repository of what's possible.

What I have in mind is a sort of "decorator library" where everyone who
has written a useful function of that kind can share it with others,
instead of only posting it here. As I don't know whether there will be a
"decorators" module in the stdlib, this would serve as a replacement
until decorators are a final language feature.

How would one realise such a project?


Maybe you could create a PythonDecoratorLibrary page at the Python wiki:
http://www.python.org/moin/PythonDecoratorLibrary


[x] done. Thanks for the good idea!

I hope you use this wikipage to publish your decorator solutions!

Reinhold

--
Wenn eine Linuxdistribution so wenig brauchbare Software wie Windows
mitbrächte, wäre das bedauerlich. Was bei Windows der Umfang eines
"kompletten Betriebssystems" ist, nennt man bei Linux eine Rescuedisk.
-- David Kastrup in de.comp.os.unix.linux.misc
Jul 18 '05 #3
Reinhold Birkenfeld <re************************@wolke7.net> writes:
[...]
What I have in mind is a sort of "decorator library" where everyone who
has written a useful function of that kind can share it with others,

[...]

God help us. <0.5 wink>
John
Jul 18 '05 #4
John J. Lee wrote:
Reinhold Birkenfeld <re************************@wolke7.net> writes:
[...]
What I have in mind is a sort of "decorator library" where everyone who
has written a useful function of that kind can share it with others,

[...]

God help us. <0.5 wink>


God IS helping us, or we wouldn't use Python.

Reinhold

--
Wenn eine Linuxdistribution so wenig brauchbare Software wie Windows
mitbrächte, wäre das bedauerlich. Was bei Windows der Umfang eines
"kompletten Betriebssystems" ist, nennt man bei Linux eine Rescuedisk.
-- David Kastrup in de.comp.os.unix.linux.misc
Jul 18 '05 #5

On 12.08.2004, at 22:42, Reinhold Birkenfeld wrote:
John J. Lee wrote:
Reinhold Birkenfeld <re************************@wolke7.net> writes:
[...]
What I have in mind is a sort of "decorator library" where everyone
who
has written a useful function of that kind can share it with others,

[...]

God help us. <0.5 wink>


God IS helping us, or we wouldn't use Python.


If there's a god, is there also a MDFH (malevolent dictator from hell)
trying to "enhance" Python? ;-)

// st****@eischet.com //

Jul 18 '05 #6
John J. Lee wrote:
God help us. <0.5 wink>


I'm seeing a pattern. You respond without reading. See
http://www.python.org/cgi-bin/moinmo...coratorLibrary
Jul 18 '05 #7
Doug Holton <in****@spam.here> writes:
John J. Lee wrote:
God help us. <0.5 wink>


I'm seeing a pattern. You respond without reading. See
http://www.python.org/cgi-bin/moinmo...coratorLibrary


OK, brevity is the soul of wit and all that, but I see I didn't
succeed in communicating my point.

I don't doubt the utility, on a case-by-case basis, of some of the
uses of decorators that people are devising, and will continue to
devise. I do fear that this is a pressure towards 'Babel-ization' of
the language.

I don't honestly know whether that fear is justified -- it's based
mostly on listening to people on this newsgroup who have posted about
their experiences with Lisp macros.
John
Jul 18 '05 #8
In article <87************@pobox.com>, jj*@pobox.com (John J. Lee) wrote:
I don't doubt the utility, on a case-by-case basis, of some of the
uses of decorators that people are devising, and will continue to
devise. I do fear that this is a pressure towards 'Babel-ization' of
the language.
It starts to remind me of a kind of obfuscation, codable
in, say, C++, where the visible text of the program is
actually irrelevant, and all the real computing is done as
side-effects of the constructors.
I don't honestly know whether that fear is justified -- [ ... ]


Ditto.

Regards. Mel.
Jul 18 '05 #9

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

Similar topics

14
by: Pete Wood | last post by:
Hi All, Does anyone have any *unbiased* views (ie. hard facts) as to why .NET would be better than Java for the development of Enterprise applications? Best Regards, -- Pete Wood ..NET...
99
by: Jim Hubbard | last post by:
It seems that Microsoft not only does not need the classic Visual Basic developer army (the largest army of developers the world has ever seen), but now they don't need ANY Windows developer at a...
7
by: John | last post by:
Thanks. I am writing a C++ code on Linux and Sun OS platform. How to make a procedure sleep or delay? Thanks again. "John Carson" <donaldquixote@datafast.net.au> wrote in message...
235
by: napi | last post by:
I think you would agree with me that a C compiler that directly produces Java Byte Code to be run on any JVM is something that is missing to software programmers so far. With such a tool one could...
27
by: Tom Rodman | last post by:
I want to embed a bash script inside the c program. How could you do the below bash snippet in "c"?: cat > /tmp/foo <<\__EOD_ all kinds of nasty stuff in here including single and double...
11
by: Jeffrey Hiess | last post by:
Something like getchar() doesn't work, since it "waits" for input. #include <stdio.h> while (1) { if (getchar()) /* break if any key is pressed */ { break; }
6
by: lvirden | last post by:
I'm responsible for supporting some C code which implements one time passwords. The author of the code is no longer available for help. The code has been used for years on a sparc solaris...
1
by: news.microsoft.com | last post by:
I am getting the following error on the return from a function call.It specically happens on the assignment of the return value from the function call. No error happens inside the function. The...
3
by: amit2781 | last post by:
I am trying to build the my project on HPUX (HP-UX oscar B.11.11 U 9000/800 741028561 unlimited-user license) which access the Mysql library. But it is giving error as : Error :...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.