Hi, I think it would be quite handy to have Expression.__floordiv__ being a shortcut for Expression.descendant.
The reasoning is that it is quite common to traverse nodes using the descendant selector in pure XPath (which is //), while calling .descendant makes the code quite verbose.
IMO it would be quite convenient to be able to type
x.current('table')//'tbody'//'tr'//'td'
instead of
x.current('table').descendant('tbody').descendant('tr').descendant('td')
What do you think?
Hi, I think it would be quite handy to have
Expression.__floordiv__being a shortcut forExpression.descendant.The reasoning is that it is quite common to traverse nodes using the descendant selector in pure XPath (which is
//), while calling.descendantmakes the code quite verbose.IMO it would be quite convenient to be able to type
instead of
What do you think?