12.4.2012 18:48, Kiuhnm kirjoitti:
On 4/11/2012 16:01, Antti J Ylikoski wrote:
On 9.4.2012 21:57, Kiuhnm wrote:
Do you have some real or realistic (but easy and self-contained)
examples when you had to define a (multi-statement) function and pass it
to another function?
Thank you.
Kiuhnm
A f
On 4/12/2012 19:29, Jan Kuiken wrote:
On 4/9/12 20:57 , Kiuhnm wrote:
Do you have some real or realistic (but easy and self-contained)
examples when you had to define a (multi-statement) function and pass it
to another function?
I don't use it daily but the first argument of list.sort, i.e. t
On 4/9/12 20:57 , Kiuhnm wrote:
Do you have some real or realistic (but easy and self-contained)
examples when you had to define a (multi-statement) function and pass it
to another function?
I don't use it daily but the first argument of list.sort, i.e. the
compare function springs to mind.
J
On 4/12/2012 8:07, Tim Roberts wrote:
Kiuhnm wrote:
That won't do. A good example is when you pass a function to re.sub, for
instance.
This is an odd request.
All shall be revealed :)
I often pass functions to functions in order to simulate a C switch
statement, such as in a language tr
On 4/11/2012 16:01, Antti J Ylikoski wrote:
On 9.4.2012 21:57, Kiuhnm wrote:
Do you have some real or realistic (but easy and self-contained)
examples when you had to define a (multi-statement) function and pass it
to another function?
Thank you.
Kiuhnm
A function to numerically integrate ano
Kiuhnm wrote:
>
>That won't do. A good example is when you pass a function to re.sub, for
>instance.
This is an odd request.
I often pass functions to functions in order to simulate a C switch
statement, such as in a language translator:
commands = {
'add': doAdd,
'subtract' : doSubt
On 04/10/12 08:36, Kiuhnm wrote:
On 4/10/2012 14:29, Ulrich Eckhardt wrote:
Am 09.04.2012 20:57, schrieb Kiuhnm:
That won't do. A good example is when you pass a function to
re.sub, for instance.
If that's a good example, then why not use it? I've used it on
multiple occasions to do lookups
On 9.4.2012 21:57, Kiuhnm wrote:
Do you have some real or realistic (but easy and self-contained)
examples when you had to define a (multi-statement) function and pass it
to another function?
Thank you.
Kiuhnm
A function to numerically integrate another function comes as follows:
On 04/11/2012 06:55 AM, Kiuhnm wrote:
> On 4/10/2012 23:43, Eelco wrote:
>> On Apr 10, 3:36 am, Kiuhnm wrote:
>>> On 4/10/2012 14:29, Ulrich Eckhardt wrote:
>>>
Am 09.04.2012 20:57, schrieb Kiuhnm:
> Do you have some real or realistic (but easy and self-contained)
> examples when you
On 4/10/2012 23:43, Eelco wrote:
On Apr 10, 3:36 am, Kiuhnm wrote:
On 4/10/2012 14:29, Ulrich Eckhardt wrote:
Am 09.04.2012 20:57, schrieb Kiuhnm:
Do you have some real or realistic (but easy and self-contained)
examples when you had to define a (multi-statement) function and pass it
to anot
On Tue, Apr 10, 2012 at 11:36 PM, Kiuhnm
wrote:
> On 4/10/2012 14:29, Ulrich Eckhardt wrote:
>>
>> Am 09.04.2012 20:57, schrieb Kiuhnm:
>>>
>>> Do you have some real or realistic (but easy and self-contained)
>>> examples when you had to define a (multi-statement) function and pass it
>>> to anoth
On Apr 10, 3:36 am, Kiuhnm wrote:
> On 4/10/2012 14:29, Ulrich Eckhardt wrote:
>
> > Am 09.04.2012 20:57, schrieb Kiuhnm:
> >> Do you have some real or realistic (but easy and self-contained)
> >> examples when you had to define a (multi-statement) function and pass it
> >> to another function?
>
On 4/10/2012 14:29, Ulrich Eckhardt wrote:
Am 09.04.2012 20:57, schrieb Kiuhnm:
Do you have some real or realistic (but easy and self-contained)
examples when you had to define a (multi-statement) function and pass it
to another function?
Take a look at decorators, they not only take non-trivi
Am 09.04.2012 20:57, schrieb Kiuhnm:
> Do you have some real or realistic (but easy and self-contained)
> examples when you had to define a (multi-statement) function and pass it
> to another function?
Take a look at decorators, they not only take non-trivial functions but
also return them. That s
On 4/9/2012 11:57 AM Kiuhnm said...
Do you have some real or realistic
... yes
(but easy and self-contained)
aah, no.
examples when you had to define a (multi-statement) function and pass it
to another function?
This weekend I added functionality to a subsystem that allows users to
On 4/9/2012 2:57 PM, Kiuhnm wrote:
Do you have some real or realistic (but easy and self-contained)
examples when you had to define a (multi-statement) function and pass it
to another function?
This is so common in Python that it is hardly worth sneezing about.
map(f, iterable)
filter(f, itera
16 matches
Mail list logo