Skip to content

Argument Clinic: char convertor should use default values of type bytes #64503

Description

@taleinat
BPO 20304
Nosy @taleinat, @larryhastings, @serhiy-storchaka
PRs
  • bpo-20180: complete AC conversion of Objects/stringlib/transmogrify.h #8039
  • 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 2018-10-12.13:06:22.204>
    created_at = <Date 2014-01-19.15:51:05.603>
    labels = ['type-bug', '3.8', 'expert-argument-clinic', 'build']
    title = 'Argument Clinic: char convertor should use default values of type bytes'
    updated_at = <Date 2018-10-12.13:06:22.195>
    user = 'https://github.com/taleinat'

    bugs.python.org fields:

    activity = <Date 2018-10-12.13:06:22.195>
    actor = 'taleinat'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-10-12.13:06:22.204>
    closer = 'taleinat'
    components = ['Build', 'Demos and Tools', 'Argument Clinic']
    creation = <Date 2014-01-19.15:51:05.603>
    creator = 'taleinat'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 20304
    keywords = ['patch']
    message_count = 4.0
    messages = ['208481', '208483', '320831', '327584']
    nosy_count = 3.0
    nosy_names = ['taleinat', 'larry', 'serhiy.storchaka']
    pr_nums = ['8039']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue20304'
    versions = ['Python 3.8']

    Activity

    1. taleinat commented on Jan 19, 2014

      @taleinat
      ContributorAuthor

      For example, in Object/stringlib/transmogrify.h, the methods ljust and rjust have an argument named fillchar of type char. It's Python default value should be b' ', but the only way I've found to do that is by setting py_default = b' '.

    2. added
      buildThe build process and cross-build
      type-bugAn unexpected behavior, bug, or error
      on Jan 19, 2014
    3. taleinat commented on Jan 19, 2014

      @taleinat
      ContributorAuthor

      Additionally, the char converter doesn't create valid c defaults. For example, I got " " instead of ' ' for fillchar, which has type char, so I had to manually set c_default = "' '".

    4. taleinat commented on Jul 1, 2018

      @taleinat
      ContributorAuthor

      See PR #52287, which fixes this in order to AC convert Objects/stringlib/transmogrify.h.

    5. taleinat commented on Oct 12, 2018

      @taleinat
      ContributorAuthor

      This was fixed in PR #52287.

    6. transferred this issue fromon Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

    Metadata

    Metadata

    Assignees

    No one assigned

      Labels

      Projects

      No projects

        Milestone

        No milestone

        Relationships

        None yet

        Development

        No branches or pull requests

        Issue actions