mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-08 13:04:46 +08:00
* Improve types for xml.etree.ElementTree Update signatures to reflect the following peculiarities of the ElementTree library: - The elementtree library accepts unicode or bytes for most xml values in python2, and coerces everywhere -- but in python3, only str makes sense. - In python 2, the library produces str or unicode instances unpredictably, depending on whether the xml is decodeable as ascii or not. In python 3, it always produces str instances. - The parser functions accept unicode or bytes in 2 and 3 -- again, will coerce individual instances so heterogeneous lists are ok. - In python 3, the tostring functions produce bytes or str, depending on the value of the 'encoding' parameter. * improve docs * Improve ElementFactory type by specifying dict of 2nd arg