Mega Code Archive
Search
.Net
ASP .Net
ASP .Net Tutorial
C#
C# Book
C# by API
C# Tutorial
VB.Net
VB.Net by API
VB.Net Tutorial
Visual C++ .Net
VisualBasic Script
Java
Java
Java Book
Java by API
Java Tutorial
Script
Flash ActionScript
Flex
JavaScript DHTML
JavaScript Reference
JavaScript Tutorial
Database
MSSQL
MSSQL Tutorial
MySQL
MySQL Tutorial
Oracle PLSQL
Oracle PLSQL Tutorial
PostgreSQL
Languages
Android
C
C Tutorial
C++
C++ Tutorial
Delphi
Perl
PHP
Python
Python Tutorial
Ruby
Silverlight
Office
MSOfficeExcel 2007 Tutorial
MSOfficePowerPoint 2007 Tutorial
MSOfficeWord 2007 Tutorial
Data
XML
XML Tutorial
Python Tutorial
Function 76 codes
Home
Python Tutorial
Function
1 A dictionary containing all keyword arguments whose keyword doesnt correspond to a formal parameter
2 A lambda function squares the members of a sequence
3 Anonymous Functions and lambda
4 Applying Functions to Arguments
5 Args and kwargs example
6 Both keyword and non-keyword variable arguments may be used in the same function as long as the keyword dictionary is last
7 Calling Functions with Variable Argument Objects
8 Create an inner function
9 Create an instance to use the class simply as a namespace container
10 Creating and using a programmer-defined function
11 Declare it in a global statement
12 Def Statement
13 Default Argument Values
14 Default Arguments
15 Define variable used by lambda function outside
16 Defs and lambdas do the same sort of work
17 Demonstrates global variables
18 Demonstrates keyword arguments and default parameter values
19 Demonstrates parameters and return values
20 Doc Strings
21 Documenting Functions
22 Finding the maximum of three integers
23 Forward References
24 Function Attributes
25 Function being called by passing the parameter values in order
26 Functions Are Objects
27 Functions can also be called using keyword arguments of the form keyword = value For instance, the following function
28 Functions Without returns
29 Global Statement
30 Globals() and locals()
31 If a function body is a single return expression statement, you may choose to replace the function with the special lambda expres
32 Keyword and Default Examples
33 Keyword Variable Arguments (Dictionary)
34 Local Names Are Detected Statically
35 Lookup variable used in lambda
36 Mix different methods of passing the parameters
37 Nested function design
38 Nested functions
39 Number of Scopes
40 Only the most local and global namespaces can be modified
41 Parameters can also be passed as a tuple using the syntax
42 Parameters can be passed as a dictionary using the syntax
43 Pass functions to other functions as arguments
44 Passing and Calling (Built-in) Functions
45 Passing Functions as parameter
46 Passing lists and individual list elements to functions
47 Passing the parameters by name
48 Positional Arguments
49 Recursion
50 Recursive factorial function
51 Recursive fibonacci function
52 Recursive Functions
53 Return a lambda function
54 Return Values and Function Types
55 Returns a list
56 Returns a tuple
57 Scope and lambda
58 Scoping example
59 Shadow variable
60 Simple Closure Example
61 Simulating Output Parameters
62 Special comments called documentation strings, or doc strings
63 Stuff function objects into data structures
64 The global Statement
65 The lambda operator creates anonymous functions
66 The semantics of argument passing
67 Unpacking arguments
68 Using lambda Functions
69 Values can be returned from functions using the return statement
70 Variable length arguments
71 Variable name lookup in nested function
72 Variable Scope and Namespaces
73 Variable Scope in Functions
74 Varible length parameter
75 Within a function, you cant use both local and global versions of the same name
76 Works for keyword arguments