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

string.strip behaves strangly #49690

Closed
dwjang mannequin opened this issue Mar 8, 2009 · 2 comments
Closed

string.strip behaves strangly #49690

dwjang mannequin opened this issue Mar 8, 2009 · 2 comments
Labels
interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error

Comments

@dwjang
Copy link
Mannequin

dwjang mannequin commented Mar 8, 2009

BPO 5440
Nosy @ezio-melotti
Dependencies
  • bpo-5439: string.strip behaves strangly
  • 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 2009-03-08.08:08:59.959>
    created_at = <Date 2009-03-08.05:28:18.641>
    labels = ['interpreter-core', 'type-bug']
    title = 'string.strip behaves strangly'
    updated_at = <Date 2009-03-08.08:08:59.632>
    user = 'https://bugs.python.org/dwjang'

    bugs.python.org fields:

    activity = <Date 2009-03-08.08:08:59.632>
    actor = 'loewis'
    assignee = 'none'
    closed = True
    closed_date = <Date 2009-03-08.08:08:59.959>
    closer = 'loewis'
    components = ['Interpreter Core']
    creation = <Date 2009-03-08.05:28:18.641>
    creator = 'dwjang'
    dependencies = ['5439']
    files = []
    hgrepos = []
    issue_num = 5440
    keywords = []
    message_count = 2.0
    messages = ['83301', '83303']
    nosy_count = 2.0
    nosy_names = ['ezio.melotti', 'dwjang']
    pr_nums = []
    priority = 'normal'
    resolution = 'duplicate'
    stage = None
    status = 'closed'
    superseder = None
    type = 'behavior'
    url = 'https://bugs.python.org/issue5440'
    versions = ['Python 2.4']

    @dwjang
    Copy link
    Mannequin Author

    dwjang mannequin commented Mar 8, 2009

    Python 2.4.2 (#1, Mar  4 2008, 22:56:43)
    [GCC 3.4.5] on linux2
    Type "help", "copyright", "credits" or "license" for more information.
    >>> temp = "a/b/c"
    >>> temp.strip("a")
    '/b/c'
    >>> temp.strip("a/")
    'b/c'
    >>> temp.strip("a/b")
    'c'
    >>> temp.strip("a/b/")
    'c'
    >>>

    So, in the second command from the last, I expected '/c' but it gives
    only 'c'.
    Why? Is it a bug or a feature that I don't understand?

    Thanks,
    DW

    @dwjang dwjang mannequin added interpreter-core (Objects, Python, Grammar, and Parser dirs) type-bug An unexpected behavior, bug, or error labels Mar 8, 2009
    @ezio-melotti
    Copy link
    Member

    Duplicated of bpo-5439

    @loewis loewis mannequin closed this as completed Mar 8, 2009
    @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

    1 participant