#NEWLINE# def xpath_eq_function( self , xpath , function ) : #NEWLINE# #INDENT# 'Matches a single element by its index::\n\n            >>> from pyquery import PyQuery\n            >>> d = PyQuery(\'<div><h1 class="first"/><h1 class="last"/></div>\')\n            >>> d(\'h1:eq(0)\')\n            [<h1.first>]\n            >>> d(\'h1:eq(1)\')\n            [<h1.last>]\n\n        ..\n        ' #NEWLINE# if ( function . argument_types ( ) != [ 'NUMBER' ] ) : #NEWLINE# #INDENT# raise ExpressionError ( ( 'Expected a single integer for :eq(), got %r' % ( function . arguments , ) ) ) #NEWLINE# #UNINDENT# value = int ( function . arguments [ 0 ] . value ) #NEWLINE# xpath . add_post_condition ( ( 'position() = %s' % ( self + 1 ) ) ) #NEWLINE# return xpath