Re: [lxml-dev] inconsistency in the text nodes?

On 16/11/2009 10:18, Stefan Behnel wrote:
Hervé Cauwelier, 16.11.2009 10:07:
I inherit from the Python unicode class, and wrap _Element*Result's parent in my own element class.
That doesn't tell me why you would want to instantiate them yourself.
It's because of the first test case where I test the construction of my own instances. I give an instance of text result without using XPath (which is tested in another test case). There's a factory function but it's not exposed to the Python level. Is it just because Cython requires variable initialization that these are declared in _ElementUnicodeResult but not in _ElementStringResult? I didn't noticed at first glance that _ElementStringResult is pure Python. I'm not familiar with Cython. Hervé

Hervé Cauwelier, 16.11.2009 12:05:
On 16/11/2009 10:18, Stefan Behnel wrote:
Hervé Cauwelier, 16.11.2009 10:07:
I inherit from the Python unicode class, and wrap _Element*Result's parent in my own element class.
That doesn't tell me why you would want to instantiate them yourself.
It's because of the first test case where I test the construction of my own instances. I give an instance of text result without using XPath (which is tested in another test case).
So, let's sum this up. You want me to give non-public classes a public interface so that you can use them in a user code test case? If that's your use case, my answer is that this is not going to happen. Stefan
participants (2)
-
Hervé Cauwelier
-
Stefan Behnel