Back to index

python3.2  3.2.2
Classes | Functions | Variables
test.test_keywordonlyarg Namespace Reference

Classes

class  Foo
class  KeywordOnlyArgTestCase

Functions

def posonly_sum
def keywordonly_sum
def keywordonly_nodefaults_sum
def keywordonly_and_kwarg_sum
def mixedargs_sum
def mixedargs_sum2
def sortnum
def sortwords
def test_main

Variables

string __author__ = "Jiwon Seo"
string __email__ = "seojiwon at gmail dot com"

Function Documentation

def test.test_keywordonlyarg.keywordonly_and_kwarg_sum (   k1,
  k2,
  kwarg 
)

Definition at line 17 of file test_keywordonlyarg.py.

00017 
00018 def keywordonly_and_kwarg_sum(*, k1, k2, **kwarg):
    return k1 + k2 + sum(kwarg.values())

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 15 of file test_keywordonlyarg.py.

00015 
00016 def keywordonly_nodefaults_sum(*, k1, k2):
    return k1 + k2

Here is the caller graph for this function:

def test.test_keywordonlyarg.keywordonly_sum (   k1 = 0,
  k2 
)

Definition at line 13 of file test_keywordonlyarg.py.

00013 
00014 def keywordonly_sum(*, k1=0, k2):
    return k1 + k2

Here is the caller graph for this function:

def test.test_keywordonlyarg.mixedargs_sum (   a,
  b = 0,
  arg,
  k1,
  k2 = 0 
)

Definition at line 19 of file test_keywordonlyarg.py.

00019 
00020 def mixedargs_sum(a, b=0, *arg, k1, k2=0):
    return a + b + k1 + k2 + sum(arg)

Here is the call graph for this function:

Here is the caller graph for this function:

def test.test_keywordonlyarg.mixedargs_sum2 (   a,
  b = 0,
  arg,
  k1,
  k2 = 0,
  kwargs 
)

Definition at line 21 of file test_keywordonlyarg.py.

00021 
00022 def mixedargs_sum2(a, b=0, *arg, k1, k2=0, **kwargs):
00023     return a + b + k1 + k2 + sum(arg) + sum(kwargs.values())

Here is the call graph for this function:

Here is the caller graph for this function:

def test.test_keywordonlyarg.posonly_sum (   pos_arg1,
  arg,
  kwarg 
)

Definition at line 11 of file test_keywordonlyarg.py.

00011 
00012 def posonly_sum(pos_arg1, *arg, **kwarg):
    return pos_arg1 + sum(arg) + sum(kwarg.values())

Here is the call graph for this function:

Here is the caller graph for this function:

def test.test_keywordonlyarg.sortnum (   nums,
  reverse = False 
)

Definition at line 24 of file test_keywordonlyarg.py.

00024 
00025 def sortnum(*nums, reverse=False):
00026     return sorted(list(nums), reverse=reverse)

Here is the call graph for this function:

Here is the caller graph for this function:

def test.test_keywordonlyarg.sortwords (   words,
  reverse = False,
  kwargs 
)

Definition at line 27 of file test_keywordonlyarg.py.

00027 
00028 def sortwords(*words, reverse=False, **kwargs):
00029     return sorted(list(words), reverse=reverse)

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 165 of file test_keywordonlyarg.py.

00165 
00166 def test_main():
00167     run_unittest(KeywordOnlyArgTestCase)

Here is the call graph for this function:


Variable Documentation

Definition at line 5 of file test_keywordonlyarg.py.

string test.test_keywordonlyarg.__email__ = "seojiwon at gmail dot com"

Definition at line 6 of file test_keywordonlyarg.py.