Le 17/08/2014 13:07, Raymond Hettinger a écrit :

FWIW, I've been teaching Python full time for three years.  I cover the
use of bytearray(n) in my classes and not a single person out of 3000+
engineers have had a problem with it.

This is less about bytearray() than bytes(), IMO. bytearray() is sufficiently specialized that only experienced people will encounter it.

And while preallocating a bytearray of a certain size makes sense, it's completely pointless for a bytes object.

Regards

Antoine.


_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to