Issue #6688: Optimize PyBytes_FromObject().

  - Add special-cases for list and tuple objects.
  - Use _PyObject_LengthHint() instead of an arbitrary value for the
    size of the initial buffer of the returned object.
1 file changed