On 2017-09-22 12:31, Simon King wrote:
On 2017-09-21, Vincent Delecroix <20100.delecr...@gmail.com> wrote:
So +1 for type(x) on non Element.

More precisely: If isinstance(x,Element), then one shouldn't call
.parent() either. Instead, one could use x._parent.

That is what the current implementation does.

Mild complication:
What should be done if x._parent is None?

Currently, we return None but we could also raise an exception.

However, I don't think that this can actually happen (except for uninitialized Elements).

--
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to