Re: Deferring a function call



Thanks for the ideas, everyone.

functools.partial and lambda expressions seem like a more pythonic way of doing what I want. I don't know whether they're actually more efficient or better, but at least they eliminate the need to carry args around separately.

I'd forgotten Python has a sched module in its standard library. It may be overkill for what I want to do but I'll take a look.

-Tom

.



Relevant Pages

  • Re: How to create functors?
    ... Lambda expressions are, I believe, syntactically limited to a single expression -- no statements, like 'print' is in Python 2.x. ... exact answer you need may vary. ... I want to avoid using a def if possible. ...
    (comp.lang.python)
  • Re: is python Object oriented??
    ... execute a piece of python code without defining class, ... python does not force you to lay out your code according to ... Now python does not have any way besides lambda expressions of creating ... polymorphism are implemented clumsily (actually I'm not even sure ...
    (comp.lang.python)
  • Re: Whoa! Do Python and Lisp really have LAMBDA ?
    ... This is what the Haskell code eventually boild down to. ... > nowhere in Python there is a claim that lambda expressions are full fledged. ...
    (comp.lang.lisp)
  • Re: is python Object oriented??
    ... execute a piece of python code without defining class, ... python does not force you to lay out your code according to ... Now python does not have any way besides lambda expressions of creating ...
    (comp.lang.python)
  • Re: Whoa! Do Python and Lisp really have LAMBDA ?
    ... This is what the Haskell code eventually boild down to. ... > nowhere in Python there is a claim that lambda expressions are full fledged. ...
    (comp.lang.python)