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

'#' has no effect with 'c' type #53177

Closed
benjaminp opened this issue Jun 6, 2010 · 6 comments
Closed

'#' has no effect with 'c' type #53177

benjaminp opened this issue Jun 6, 2010 · 6 comments
Assignees
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@benjaminp
Copy link
Contributor

BPO 8931
Nosy @ericvsmith, @tiran, @benjaminp, @Bluehorn
Files
  • issue_8931.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 = 'https://github.com/ericvsmith'
    closed_at = <Date 2014-04-15.07:05:48.323>
    created_at = <Date 2010-06-06.23:07:14.359>
    labels = ['interpreter-core', 'type-bug']
    title = "'#' has no effect with 'c' type"
    updated_at = <Date 2014-04-16.02:38:06.767>
    user = 'https://github.com/benjaminp'

    bugs.python.org fields:

    activity = <Date 2014-04-16.02:38:06.767>
    actor = 'python-dev'
    assignee = 'eric.smith'
    closed = True
    closed_date = <Date 2014-04-15.07:05:48.323>
    closer = 'eric.smith'
    components = ['Interpreter Core']
    creation = <Date 2010-06-06.23:07:14.359>
    creator = 'benjamin.peterson'
    dependencies = []
    files = ['23904']
    hgrepos = []
    issue_num = 8931
    keywords = ['patch']
    message_count = 6.0
    messages = ['107250', '107255', '149191', '192365', '216279', '216421']
    nosy_count = 5.0
    nosy_names = ['eric.smith', 'christian.heimes', 'benjamin.peterson', 'torsten', 'python-dev']
    pr_nums = []
    priority = 'normal'
    resolution = 'fixed'
    stage = 'patch review'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue8931'
    versions = ['Python 3.5']

    @benjaminp
    Copy link
    Contributor Author

    $ python3
    Python 3.1.2 (release31-maint, May  3 2010, 22:18:46)
    [GCC 4.3.4] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> format(ord("a"), "c")
    'a'
    >>> format(ord("a"), "#c")
    'a'

    I wonder if '#' with 'c' should raise an exception.

    @benjaminp benjaminp added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Jun 6, 2010
    @ericvsmith
    Copy link
    Member

    I think that every type that # does not apply to should raise an exception.

    @Bluehorn
    Copy link
    Mannequin

    Bluehorn mannequin commented Dec 10, 2011

    Attached patch makes Python throw an exception in the case above.
    It also adds a test case for that case.

    @tiran
    Copy link
    Member

    tiran commented Jul 5, 2013

    I'm moving the patch to Python 3.4. 2.7 to 3.3 are out of scope as the change might break software.

    @mdickinson mdickinson changed the title '#' has no affect with 'c' type '#' has no effect with 'c' type Apr 14, 2014
    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Apr 15, 2014

    New changeset 16efa8d27e4c by Eric V. Smith in branch '3.4':
    Closed issue bpo-8931: Make alternate formatting for 'c' raise an exception. Patch by Torsten Landschoff.
    http://hg.python.org/cpython/rev/16efa8d27e4c

    @python-dev
    Copy link
    Mannequin

    python-dev mannequin commented Apr 16, 2014

    New changeset b1aba042b36c by Eric V. Smith in branch 'default':
    Close issue bpo-8931: Make alternate formatting for 'c' raise an exception. Patch by Torsten Landschoff.
    http://hg.python.org/cpython/rev/b1aba042b36c

    @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
    interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error
    Projects
    None yet
    Development

    No branches or pull requests

    3 participants