On Dec 13, 2:27 am, Robert Kern wrote:
> On 12/12/11 3:36 AM, alex23 wrote:
>
> > On Dec 9, 8:08 pm, Robert Kern wrote:
> >> On 12/9/11 5:02 AM, alex23 wrote:
> >>> The 3rd party 'decorator' module takes care of issues like docstrings
> >>> & function signatures. I'd really like to see some of
On 12/12/11 3:36 AM, alex23 wrote:
On Dec 9, 8:08 pm, Robert Kern wrote:
On 12/9/11 5:02 AM, alex23 wrote:
The 3rd party 'decorator' module takes care of issues like docstrings
&function signatures. I'd really like to see some of that
functionality in the stdlib though.
Much of it is:
On Monday, December 12, 2011 1:47:52 PM UTC+8, alex23 wrote:
> On Dec 12, 2:51 pm, 8 Dihedral
> wrote:
> > To wrap a function properly is different from the 1-line lampda.
> >
> > This is really functional programming.
> >
> > Every function can be decorated to change into a different one easi
alex23 wrote:
On Dec 9, 8:08 pm, Robert Kern wrote:
On 12/9/11 5:02 AM, alex23 wrote:
The 3rd party 'decorator' module takes care of issues like docstrings
& function signatures. I'd really like to see some of that
functionality in the stdlib though.
Much of it is:
http://docs.python.org
On Dec 12, 2:51 pm, 8 Dihedral
wrote:
> To wrap a function properly is different from the 1-line lampda.
>
> This is really functional programming.
>
> Every function can be decorated to change into a different one easily.
>
> There is a method to replace every return action of a python func
On Monday, December 12, 2011 11:36:07 AM UTC+8, alex23 wrote:
> On Dec 9, 8:08 pm, Robert Kern wrote:
> > On 12/9/11 5:02 AM, alex23 wrote:
> > > The 3rd party 'decorator' module takes care of issues like docstrings
> > > & function signatures. I'd really like to see some of that
> > > functional
On Dec 9, 8:08 pm, Robert Kern wrote:
> On 12/9/11 5:02 AM, alex23 wrote:
> > The 3rd party 'decorator' module takes care of issues like docstrings
> > & function signatures. I'd really like to see some of that
> > functionality in the stdlib though.
>
> Much of it is:
>
> http://docs.python.o
Wrap functions to yield is somewhat like a sub-threading in Erlang.
--
http://mail.python.org/mailman/listinfo/python-list
Just wrap the exec() to spawn for fun.
--
http://mail.python.org/mailman/listinfo/python-list
On Saturday, December 10, 2011 2:28:49 AM UTC+8, 8 Dihedral wrote:
> On Thursday, December 8, 2011 7:43:12 PM UTC+8, Chris Angelico wrote:
> > On Thu, Dec 8, 2011 at 10:22 PM, K.-Michael Aye wrote:
> > > I am still perplexed about decorators though, am happily using Python for
> > > many years
On Thursday, December 8, 2011 7:43:12 PM UTC+8, Chris Angelico wrote:
> On Thu, Dec 8, 2011 at 10:22 PM, K.-Michael Aye wrote:
> > I am still perplexed about decorators though, am happily using Python for
> > many years without them, but maybe i am missing something?
> > For example in the above c
On 8 Dic, 12:22, K.-Michael Aye wrote:
> On 2011-12-08 08:59:26 +, Thomas Rachel said:
>
>
>
> > Am 08.12.2011 08:18 schrieb 8 Dihedral:
> >> I use the @ decorator to behave exactly like a c macro that
> >> does have fewer side effects.
>
> >> I am wondering is there other interesting meth
Am 08.12.2011 12:43 schrieb Chris Angelico:
On Thu, Dec 8, 2011 at 10:22 PM, K.-Michael Aye wrote:
I am still perplexed about decorators though, am happily using Python for
many years without them, but maybe i am missing something?
For example in the above case, if I want the names attached to
On 12/9/11 5:02 AM, alex23 wrote:
On Dec 9, 2:38 am, Chris Angelico wrote:
One piece of sophistication that I would rather like to see, but don't
know how to do. Instead of *args,**kwargs, is it possible to somehow
copy in the function's actual signature? I was testing this out in
IDLE, and the
On Dec 9, 2:38 am, Chris Angelico wrote:
> One piece of sophistication that I would rather like to see, but don't
> know how to do. Instead of *args,**kwargs, is it possible to somehow
> copy in the function's actual signature? I was testing this out in
> IDLE, and the fly help for the function no
Chris Angelico wrote:
One piece of sophistication that I would rather like to see, but don't
know how to do. Instead of *args,**kwargs, is it possible to somehow
copy in the function's actual signature? I was testing this out in
IDLE, and the fly help for the function no longer gave useful info
a
Chris Angelico wrote:
One piece of sophistication that I would rather like to see, but don't
know how to do. Instead of *args,**kwargs, is it possible to somehow
copy in the function's actual signature? I was testing this out in
IDLE, and the fly help for the function no longer gave useful info
a
> One piece of sophistication that I would rather like to see, but don't
> know how to do. Instead of *args,**kwargs, is it possible to somehow
> copy in the function's actual signature? I was testing this out in
> IDLE, and the fly help for the function no longer gave useful info
> about its argum
Decorators are great for adding common functionality to several
functions without duplicating code. For example, I have one for my IRC
bot that checks that the person sending the command is authorized to use
the command. It's only "if mask in owner list then execute function else
say access denied"
On 12/8/2011 10:38 AM, Chris Angelico wrote:
> One piece of sophistication that I would rather like to see, but don't
> know how to do. Instead of *args,**kwargs, is it possible to somehow
> copy in the function's actual signature?
I remember seeing this in a PEP that is planned to be implemented i
On Fri, Dec 9, 2011 at 3:24 AM, K.-Michael Aye wrote:
> I understand this one, it seems really useful. And maybe i start to sense
> some more applicability. Like this, with extra flags that could be set at
> run time, I could influence the way a function is executed without designing
> the functio
On 2011-12-08 11:43:12 +, Chris Angelico said:
On Thu, Dec 8, 2011 at 10:22 PM, K.-Michael Aye wrote:
I am still perplexed about decorators though, am happily using Python for
many years without them, but maybe i am missing something?
For example in the above case, if I want the names atta
On Thu, Dec 8, 2011 at 10:22 PM, K.-Michael Aye wrote:
> I am still perplexed about decorators though, am happily using Python for
> many years without them, but maybe i am missing something?
> For example in the above case, if I want the names attached to each other
> with a comma, why wouldn't I
On 2011-12-08 08:59:26 +, Thomas Rachel said:
Am 08.12.2011 08:18 schrieb 8 Dihedral:
I use the @ decorator to behave exactly like a c macro that
does have fewer side effects.
I am wondering is there other interesting methods to do the
jobs in Python?
In combination with a generator,
On Thu, Dec 8, 2011 at 7:59 PM, Thomas Rachel
wrote:
> Many other things are thinkable...
And many more are unthinkable. Can we start an International
Obfuscated Python Code Contest? It's the only place such...
abhorrences can properly flourish.
ChrisA
--
http://mail.python.org/mailman/listinfo
Am 08.12.2011 08:18 schrieb 8 Dihedral:
I use the @ decorator to behave exactly like a c macro that
does have fewer side effects.
I am wondering is there other interesting methods to do the
jobs in Python?
In combination with a generator, you can do many funny things.
For example, you ca
On Wed, Dec 7, 2011 at 11:18 PM, 8 Dihedral
wrote:
> I use the @ decorator to behave exactly like a c macro that
> does have fewer side effects.
>
> I am wondering is there other interesting methods to do the
> jobs in Python?
* Class decorators (http://www.python.org/dev/peps/pep-3129/ ); i.
I use the @ decorator to behave exactly like a c macro that
does have fewer side effects.
I am wondering is there other interesting methods to do the
jobs in Python?
A lot people complained that no macro in Python.
Cheers to the rule of Python :
If there's none then just go ahead and build
28 matches
Mail list logo