15.10.20 22:16, Roland Müller via Python-list пише: > I used the triple single quotes as delimiter: > >>>> s = r'''a single quote ', a double quote "''' >>>> s > > 'a single quote \', a double quote "'
It does not help if the string contains both kinds of triple quotes You have to use triple quotes (''', """) for docstrings. or contains one kind of triple quote and ends with a single quote of other kind. a triple single quote ''', a single double quote " Of course there are workarounds, but the fact that changing the current rules will break existing code. -- https://mail.python.org/mailman/listinfo/python-list