Skip to content

quote marks problem on loaded file #70617

Closed

Description

@quetzal
mannequin
BPO 26430

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 2016-02-24.20:07:52.896>
created_at = <Date 2016-02-24.19:13:36.257>
labels = ['type-bug', 'invalid']
title = 'quote marks problem on loaded file'
updated_at = <Date 2016-02-25.05:40:29.914>
user = 'https://bugs.python.org/quetzal'

bugs.python.org fields:

activity = <Date 2016-02-25.05:40:29.914>
actor = 'quetzal'
assignee = 'none'
closed = True
closed_date = <Date 2016-02-24.20:07:52.896>
closer = 'SilentGhost'
components = []
creation = <Date 2016-02-24.19:13:36.257>
creator = 'quetzal'
dependencies = []
files = []
hgrepos = []
issue_num = 26430
keywords = []
message_count = 7.0
messages = ['260826', '260827', '260828', '260830', '260832', '260835', '260839']
nosy_count = 2.0
nosy_names = ['SilentGhost', 'quetzal']
pr_nums = []
priority = 'normal'
resolution = 'not a bug'
stage = 'resolved'
status = 'closed'
superseder = None
type = 'behavior'
url = 'https://bugs.python.org/issue26430'
versions = ['Python 3.4']

Activity

  1. quetzal commented on Feb 24, 2016

    quetzalmannequin
    MannequinAuthor

    impossible to match a string pattern with a quotation mark in an opened file
    [code]
    file = '''it's an opened file made of "strings"'''
    if '''"string"''' in file:
    ____print('ok')
    else:
    ____print('none')
    [/code]
    in iddle, it works with no difficulties...
    but if the file comes from an file = open(fileadress).read()

    the same code return nothing... it do not find the pattern string, and just because of double quote marks (i've not tried with some other marks)

    for me it's a bug, because it do works well, if their no quotation marks

  2. quetzal commented on Feb 24, 2016

    quetzalmannequin
    MannequinAuthor

    the word "string" got an "s" for sure, or it will not match it... but the problem is not about typography :D

  3. SilentGhost commented on Feb 24, 2016

    SilentGhostmannequin
    Mannequin

    Could you please upload the test file that would allow us to reproduce this behaviour.

  4. quetzal commented on Feb 24, 2016

    quetzalmannequin
    MannequinAuthor

    well, silentghost... a .txt file, or an .html and that's all... if there's some text into... just find a pattern with some - " -

    import the file in python(iddle)

    and type :

    if '''pattern''' in file:
    __ print('ok')
    else:
    __ print('none')

    i don't think that a file is really necessary... you'll do certainly better than me in testing...

  5. SilentGhost commented on Feb 24, 2016

    SilentGhostmannequin
    Mannequin

    OK, sorry, but this is just nonsense. What most likely happens in your case is that the file doesn't contain a standard ASCII double quote, but one of it's fancy siblings.

    For the note: I did test and naturally wasn't able to reproduce this.

  6. quetzal commented on Feb 24, 2016

    quetzalmannequin
    MannequinAuthor

    thanks silentghost for tested it... i'm gonna try to see what happened be there...

  7. quetzal commented on Feb 25, 2016

    quetzalmannequin
    MannequinAuthor

    solution found.
    as Silentghost was saying, the problem was in the encoding of the quotemarks... and somes other /ecute and web encoding... unseeabble directly in my navigator, and not directly in free-access by a simple xxx.replace(a,b)...
    the translation was not complete, and i omit to verify it before to come here... sorry... but it was really weird

  8. 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

    type-bugAn unexpected behavior, bug, or error

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions