[issue17904] bytes should be listed as built-in function for 2.7
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
New submission from Florent Xicluna: Looking into the summary table, there's no information about the `bytes` built-in alias for `str`: http://docs.python.org/2/library/functions.html IMHO it should appear in this table (as str, unicode, bytearray) with the appropriate `.. versionadded:`. ---------- assignee: docs@python components: Documentation messages: 188349 nosy: docs@python, flox priority: normal severity: normal status: open title: bytes should be listed as built-in function for 2.7 type: behavior versions: Python 2.7 _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue17904> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Changes by Antoine Pitrou <pitrou@free.fr>: ---------- stage: -> needs patch _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue17904> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Ezio Melotti added the comment: Here's a patch. Do you think it should be added under the string signature too? It will make linking easier, but it might be more confusing for users. ---------- keywords: +patch nosy: +chris.jerdonek, ezio.melotti stage: needs patch -> patch review type: behavior -> enhancement Added file: http://bugs.python.org/file30201/issue17904.diff _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue17904> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Andy Maier added the comment: Ezio, what do you mean with "string signature"? For me, the patch looks fine as it is. ---------- nosy: +andymaier _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue17904> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Ezio Melotti added the comment: I mean here: https://docs.python.org/2/library/functions.html#str ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue17904> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Andy Maier added the comment: Your patch right now generates the line: New in version 2.6: bytes() has been added as an alias for str() at the end of the paragraph for str(). To me, that is sufficient for the description of str(). If anything, we could add a separate paragraph for bytes(), after the paragraph for bytearray(), e.g. like this: ---------------------------------- .. function:: bytes() Alias for :func:`str`. .. versionadded:: 2.6 ---------------------------------- If that is what you had in mind, I think it is a good idea to add it. Andy ---------- _______________________________________ Python tracker <report@bugs.python.org> <http://bugs.python.org/issue17904> _______________________________________
![](https://secure.gravatar.com/avatar/fa0f7819f1825f596b384c19aa7dcf33.jpg?s=120&d=mm&r=g)
Zachary Ware <zachary.ware@gmail.com> added the comment: As 2.7 has now reached EOL, I'm closing the issue. ---------- nosy: +zach.ware resolution: -> out of date stage: patch review -> resolved status: open -> closed _______________________________________ Python tracker <report@bugs.python.org> <https://bugs.python.org/issue17904> _______________________________________
participants (5)
-
Andy Maier
-
Antoine Pitrou
-
Ezio Melotti
-
Florent Xicluna
-
Zachary Ware