How to recover bytes function?
ben+python at benfinney.id.au
Fri Nov 14 00:37:57 CET 2014
satishmlmlml at gmail.com writes:
> file = open('data.bin', 'rb')
> bytes = file.read()
These are both terrible names, not least because they clobber the
built-in objects ‘file’ and ‘bytes’.
Don't name an object for *or not only for) its data type. Instead,
choose names that convey the *purpose* for the object.
\ “Alternative explanations are always welcome in science, if |
`\ they are better and explain more. Alternative explanations that |
_o__) explain nothing are not welcome.” —Victor J. Stenger, 2001-11-05 |
More information about the Python-list