<div dir="ltr"><div><div><div>Hello and happy 2013,<br><br></div>Something I noticed earlier today is that some C versions of stdlib modules define their name similarly to the Python version in their PyTypeObject. Some examples: Decimal, xml.etree's Element. Others prepend an understore, like _pickle.Pickler and many others.<br>
<br></div>What are the tradeoffs involved in this choice? Is there a "right" thing for types that are supposed to be compatible (i.e. the C extension, where available, replaces the Python implementation seamlessly)?<br>
<br></div>I can think of some meanings for pickling. Unpickling looks at the class name to figure out how to unpickle a user-defined object, so this can affect the pickle/unpickle compatibility between the C and Python versions. What else?<br>
<br>Eli<br><br></div>