Skip to Content
Perl To Python Migration
book

Perl To Python Migration

by Martin C. Brown
November 2001
Beginner
320 pages
5h 53m
English
Pearson Business
Content preview from Perl To Python Migration

ADVANCED FUNCTION CALLING

Beyond the basics of functions that we have already seen, Python also supports some more advanced function handling. The apply statement is a required feature if you want to be able to dynamically call a function without knowing its name or the arguments you will supply it beforehand. The map statement provides the same functionality as the Perl map function – it allows you to apply the same function to an arbitrary list.

The last two features are connected. It should come as no surprise that functions are just Python objects. As such, we can assign functions to names and then call them dynamically and therefore indirectly. As an extension of this, we can also create a name that points to a function that has no real ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Perl in a Nutshell

Perl in a Nutshell

Nathan Patwardhan, Ellen Siever, Stephen Spainhour
Perl by Example

Perl by Example

Ellie Quigley
Perl Hacks

Perl Hacks

Chromatic, Damian Conway, Curtis Ovid Poe, Curtis (Ovid) Poe

Publisher Resources

ISBN: 0201734885Purchase book