[New-bugs-announce] [issue12323] ElementPath 1.3 expressions

patrick vrijlandt report at bugs.python.org
Mon Jun 13 12:11:33 CEST 2011


New submission from patrick vrijlandt <patrick.vrijlandt at gmail.com>:

>From http://effbot.org/zone/element-xpath.htm:

[position]	(New in 1.3) Selects all elements that are located at the given position. The position can be either an integer (1 is the first position), the expression “last()” (for the last position), or a position relative to last() (e.g. “last()-1” for the second to last position). This predicate must be preceeded by a tag name.

Testing shows, that [0] is accepted, and seems to be [last()]. 
However [-1] selects no elements. I think these expressions should raise an exception. (Or the feature should be 0-based and behave like python list indices)

----------
components: XML
messages: 138230
nosy: patrick.vrijlandt
priority: normal
severity: normal
status: open
title: ElementPath 1.3 expressions
type: behavior
versions: Python 3.2

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue12323>
_______________________________________


More information about the New-bugs-announce mailing list