Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bytes should be listed as built-in function for 2.7 #62104

Closed
florentx mannequin opened this issue May 4, 2013 · 6 comments
Closed

bytes should be listed as built-in function for 2.7 #62104

florentx mannequin opened this issue May 4, 2013 · 6 comments
Labels
docs Documentation in the Doc dir type-feature A feature request or enhancement

Comments

@florentx
Copy link
Mannequin

florentx mannequin commented May 4, 2013

BPO 17904
Nosy @ezio-melotti, @florentx, @cjerdonek, @zware, @andy-maier
Files
  • issue17904.diff
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2020-04-27.01:31:15.258>
    created_at = <Date 2013-05-04.10:34:39.881>
    labels = ['type-feature', 'docs']
    title = 'bytes should be listed as built-in function for 2.7'
    updated_at = <Date 2020-04-27.01:31:15.257>
    user = 'https://github.com/florentx'

    bugs.python.org fields:

    activity = <Date 2020-04-27.01:31:15.257>
    actor = 'zach.ware'
    assignee = 'docs@python'
    closed = True
    closed_date = <Date 2020-04-27.01:31:15.258>
    closer = 'zach.ware'
    components = ['Documentation']
    creation = <Date 2013-05-04.10:34:39.881>
    creator = 'flox'
    dependencies = []
    files = ['30201']
    hgrepos = []
    issue_num = 17904
    keywords = ['patch']
    message_count = 6.0
    messages = ['188349', '188852', '222025', '222026', '222049', '367341']
    nosy_count = 6.0
    nosy_names = ['ezio.melotti', 'flox', 'chris.jerdonek', 'docs@python', 'zach.ware', 'andymaier']
    pr_nums = []
    priority = 'normal'
    resolution = 'out of date'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue17904'
    versions = ['Python 2.7']

    @florentx
    Copy link
    Mannequin Author

    florentx mannequin commented May 4, 2013

    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:`.

    @florentx florentx mannequin added the type-bug An unexpected behavior, bug, or error label May 4, 2013
    @florentx florentx mannequin assigned docspython May 4, 2013
    @florentx florentx mannequin added the docs Documentation in the Doc dir label May 4, 2013
    @ezio-melotti
    Copy link
    Member

    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.

    @ezio-melotti ezio-melotti added type-feature A feature request or enhancement and removed type-bug An unexpected behavior, bug, or error labels May 10, 2013
    @andy-maier
    Copy link
    Mannequin

    andy-maier mannequin commented Jul 1, 2014

    Ezio, what do you mean with "string signature"?

    For me, the patch looks fine as it is.

    @ezio-melotti
    Copy link
    Member

    @andy-maier
    Copy link
    Mannequin

    andy-maier mannequin commented Jul 1, 2014

    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

    @zware
    Copy link
    Member

    zware commented Apr 27, 2020

    As 2.7 has now reached EOL, I'm closing the issue.

    @zware zware closed this as completed Apr 27, 2020
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    docs Documentation in the Doc dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants