Decorator "platform"

  • Thread starter Reinhold Birkenfeld
  • Start date
R

Reinhold Birkenfeld

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
 
D

Doug Holton

Reinhold said:
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):
....
}}}
 
J

John J. Lee

Reinhold Birkenfeld said:
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
 
R

Reinhold Birkenfeld

John said:
Reinhold Birkenfeld said:
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
 
S

Stefan Eischet

John said:
Reinhold Birkenfeld said:
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? ;-)

// (e-mail address removed) //
 
J

John J. Lee

Doug Holton said:
I'm seeing a pattern. You respond without reading. See
http://www.python.org/cgi-bin/moinmoin/PythonDecoratorLibrary

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
 
M

Mel Wilson

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.
 

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,202
Messages
2,571,057
Members
47,667
Latest member
DaniloB294

Latest Threads

Top