Re: small inconsistency in ElementTree (1.2.6)

2005-12-10 Thread Damjan
>>> ascii strings and unicode strings are perfectly interchangable, with >>> some minor exceptions. >> >> It's not only translate, it's decode too... > > why would you use decode on the strings you get back from ET ? Long story... some time ago when computers wouldn't support charsets people inven

Re: small inconsistency in ElementTree (1.2.6)

2005-12-09 Thread Fredrik Lundh
Damjan wrote: > > ascii strings and unicode strings are perfectly interchangable, with some > > minor exceptions. > > It's not only translate, it's decode too... why would you use decode on the strings you get back from ET ? > probably other methods and behaviour differ too. > > And the bigger p

Re: small inconsistency in ElementTree (1.2.6)

2005-12-09 Thread Damjan
>> Do I need to check the output of ElementTree everytime, or there's some >> hidden switch to change this behaviour? > > no. > > ascii strings and unicode strings are perfectly interchangable, with some > minor exceptions. It's not only translate, it's decode too... probably other methods and beh

Re: small inconsistency in ElementTree (1.2.6)

2005-12-08 Thread Fredrik Lundh
Damjan wrote: > Attached is the smallest test case, that shows that ElementTree returns > a string object if the text in the tree is only ascii, but returns a unicode > object otherwise. > > This would make sense if the sting object and unicode object were > interchangeable... but they are not - o