py2vs3.rst 772 B

123456789101112131415161718
  1. Python 2 vs. Python 3
  2. ---------------------
  3. Dnspython was originally written in Python 2, and for some years had a
  4. separate Python 3 branch. Thanks to some excellent work by
  5. contributors to the project, there is now a single source tree that
  6. works for both.
  7. The most significant user-visible differences between the two are in
  8. the representations of binary data and textual data. For Python 3,
  9. binary data is stored using the `bytes` type, and textual data is stored
  10. using the `str` type. For Python 2, binary data is stored using the
  11. `str` type, and textual data can use the `str` or `unicode` types.
  12. Because there is a single source tree, the documentation will refer to
  13. `binary` and `text` when describing the types of binary data or
  14. textual data, respectively.