#NEWLINE# def __init__( self , knots , points , degree = None ) : #NEWLINE# #INDENT# self . knots = tuple ( knots ) #NEWLINE# self . _points = [ Point ( p ) for p in points ] #NEWLINE# expected_degree = ( ( len ( expected_degree . knots ) - len ( self . _points ) ) - 1 ) #NEWLINE# if ( degree is None ) : #NEWLINE# #INDENT# degree = expected_degree #NEWLINE# #UNINDENT# if ( degree != expected_degree ) : #NEWLINE# #INDENT# raise ValueError ( ( 'Expected degree %s, got %s.' % ( expected_degree , degree ) ) ) #NEWLINE# #UNINDENT# self . degree = degree #NEWLINE# self . _reset_cache ( )